1
0
mirror of synced 2024-11-22 04:56:07 +03:00

Update README, update tests

This commit is contained in:
Akolzin Dmitry 2018-08-21 10:47:31 +03:00
parent cc995b83f5
commit e93d2e2018
12 changed files with 41 additions and 39 deletions

View File

@ -29,8 +29,4 @@ By default ICML file is being generated by module every 4 hours. You can find fi
composer require retailcrm/api-client-php ~5.0
```
2) Unpack the archive with the module into the `app/code/Retailcrm/Retailcrm` directory.
3) Change `app/etc/config.php` file by adding `'Retailcrm_Retailcrm' => 1` line into `modules` array
This module is compatible with Magento up to version 2.2.3

View File

@ -33,11 +33,6 @@ Magento module
composer require retailcrm/api-client-php ~5.0
```
2) Распакуйте архив с модулем в директорию "app/code/Retailcrm/Retailcrm".
3) В файле "app/etc/config.php" в массив `modules` добавьте элемент `'Retailcrm_Retailcrm' => 1`
В конфигурационный файл `composer.json` вашего проекта будет добавлена библиотека [retailcrm/api-client-php](https://github.com/retailcrm/api-client-php), которая будет установлена в директорию `vendor/`.

View File

@ -73,9 +73,11 @@ class Payment extends \Magento\Config\Block\System\Config\Form\Fieldset
public function render(AbstractElement $element)
{
$html = '';
$htmlError = '
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
';
$htmlError = sprintf(
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
__('Enter API of your URL and API key')
);
$html .= $this->_getHeaderHtml($element);
if ($this->client->isConfigured()) {

View File

@ -79,9 +79,10 @@ class Shipping extends \Magento\Config\Block\System\Config\Form\Fieldset
public function render(AbstractElement $element)
{
$html = '';
$htmlError = '
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
';
$htmlError = sprintf(
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
__('Enter API of your URL and API key')
);
$html .= $this->_getHeaderHtml($element);

View File

@ -76,9 +76,10 @@ class Site extends \Magento\Config\Block\System\Config\Form\Fieldset
public function render(AbstractElement $element)
{
$html = '';
$htmlError = '
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
';
$htmlError = sprintf(
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
__('Enter API of your URL and API key')
);
$html .= $this->_getHeaderHtml($element);
if ($this->client->isConfigured()) {

View File

@ -78,9 +78,10 @@ class Sites extends \Magento\Config\Block\System\Config\Form\Fieldset
public function render(AbstractElement $element)
{
$html = '';
$htmlError = '
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
';
$htmlError = sprintf(
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
__('Enter API of your URL and API key')
);
$html .= $this->_getHeaderHtml($element);
if ($this->client->isConfigured()) {

View File

@ -73,9 +73,10 @@ class Status extends \Magento\Config\Block\System\Config\Form\Fieldset
public function render(AbstractElement $element)
{
$html = '';
$htmlError = '
<div style="margin-left: 15px;"><b><i>'. __('Enter API of your URL and API key') . '</i></b></div>
';
$htmlError = sprintf(
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
__('Enter API of your URL and API key')
);
$html .= $this->_getHeaderHtml($element);

View File

@ -69,9 +69,10 @@ class PaymentTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest
$this->assertContains($this->testFieldSetCss, $html);
if (!$isConfigured) {
$expected = '
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
';
$expected = sprintf(
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
__('Enter API of your URL and API key')
);
$this->assertContains($expected, $html);
}
}

View File

@ -69,9 +69,10 @@ class ShippingTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest
$this->assertContains($this->testFieldSetCss, $html);
if (!$isConfigured) {
$expected = '
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
';
$expected = sprintf(
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
__('Enter API of your URL and API key')
);
$this->assertContains($expected, $html);
}
}

View File

@ -60,9 +60,10 @@ class SiteTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest
$this->assertContains($this->testFieldSetCss, $html);
if (!$isConfigured) {
$expected = '
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
';
$expected = sprintf(
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
__('Enter API of your URL and API key')
);
$this->assertContains($expected, $html);
}
}

View File

@ -72,9 +72,10 @@ class SitesTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest
$this->assertContains($this->testFieldSetCss, $html);
if (!$isConfigured) {
$expected = '
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
';
$expected = sprintf(
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
__('Enter API of your URL and API key')
);
$this->assertContains($expected, $html);
}
}

View File

@ -69,9 +69,10 @@ class StatusTest extends \Retailcrm\Retailcrm\Test\Helpers\FieldsetTest
$this->assertContains($this->testFieldSetCss, $html);
if (!$isConfigured) {
$expected = '
<div style="margin-left: 15px;"><b><i>' . __('Enter API of your URL and API key') . '</i></b></div>
';
$expected = sprintf(
'<div style="margin-left: 15px;"><b><i>%s</i></b></div>',
__('Enter API of your URL and API key')
);
$this->assertContains($expected, $html);
}
}