Beispiel #1
0
 /**
  * @dataProvider isPaymentEnabledDataProvider
  */
 public function testIsPaymentEnabled($groupConfig, $expected)
 {
     $this->_element->setGroup($groupConfig);
     $this->_backendConfig->expects($this->any())->method('getConfigDataValue')->will($this->returnValueMap([[self::CONFIG_PATH_ACTIVE, null, null, '1'], [self::CONFIG_PATH_NOT_ACTIVE, null, null, '0']]));
     $html = $this->_model->render($this->_element);
     $this->assertContains($expected, $html);
 }
Beispiel #2
0
 /**
  * Prepare backend config for test
  *
  * @param string|null|false $config
  */
 private function _configurationCountryCodePrepareConfig($config)
 {
     $this->_backendConfig->expects($this->once())->method('getConfigDataValue')->with(\Magento\Paypal\Block\Adminhtml\System\Config\Field\Country::FIELD_CONFIG_PATH)->will($this->returnValue($config));
 }