1
0
mirror of synced 2024-11-24 14:06:07 +03:00

Merge pull request #28 from Evgeniy-Goroh/master

fix test
This commit is contained in:
Alex Lushpai 2019-10-24 10:49:29 +03:00 committed by GitHub
commit c2c2fa0a95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 9 deletions

View File

@ -81,13 +81,8 @@ class Payment extends \Magento\Config\Block\System\Config\Form\Fieldset
$html .= $this->_getHeaderHtml($element); $html .= $this->_getHeaderHtml($element);
if ($this->client->isConfigured()) { if ($this->client->isConfigured()) {
$manager = \Magento\Framework\App\ObjectManager::getInstance(); $paymentMethods = $this->paymentConfig->getActiveMethods();
$paymentMethodListInterface = $manager->get(\Magento\Payment\Api\PaymentMethodListInterface::class); foreach ($paymentMethods as $code => $payment) {
$storeManagerInterface = $manager->get('Magento\Store\Model\StoreManagerInterface');
$storeId = $storeManagerInterface->getStore()->getId();
$paymentMethodList = $paymentMethodListInterface->getActiveList($storeId);
foreach ($paymentMethodList as $code => $payment) {
$html .= $this->_getFieldHtml($element, $payment); $html .= $this->_getFieldHtml($element, $payment);
} }
} else { } else {

View File

@ -54,7 +54,8 @@ class OrderTest extends \PHPUnit\Framework\TestCase
->with($this->logicalOr( ->with($this->logicalOr(
$this->equalTo('retailcrm/retailcrm_status/processing'), $this->equalTo('retailcrm/retailcrm_status/processing'),
$this->equalTo('retailcrm/retailcrm_payment/checkmo'), $this->equalTo('retailcrm/retailcrm_payment/checkmo'),
$this->equalTo('retailcrm/retailcrm_shipping/flatrate') $this->equalTo('retailcrm/retailcrm_shipping/flatrate'),
$this->equalTo('retailcrm/retailcrm_site/default')
))->will($this->returnCallback([$this, 'getCallbackDataConfig'])); ))->will($this->returnCallback([$this, 'getCallbackDataConfig']));
$mockProduct = $this->getMockBuilder(\Magento\Catalog\Model\Product::class) $mockProduct = $this->getMockBuilder(\Magento\Catalog\Model\Product::class)
@ -167,7 +168,8 @@ class OrderTest extends \PHPUnit\Framework\TestCase
$data = [ $data = [
'retailcrm/retailcrm_status/processing' => 'new', 'retailcrm/retailcrm_status/processing' => 'new',
'retailcrm/retailcrm_payment/checkmo' => 'test', 'retailcrm/retailcrm_payment/checkmo' => 'test',
'retailcrm/retailcrm_shipping/flatrate' => 'test' 'retailcrm/retailcrm_shipping/flatrate' => 'test',
'retailcrm/retailcrm_site/default' => 'test'
]; ];
return $data[$key]; return $data[$key];