Carrier helper test
Definition at line 11 of file CarrierTest.php.
◆ getOnlineCarrierCodesDataProvider()
getOnlineCarrierCodesDataProvider |
( |
| ) |
|
Data provider
- Returns
- array
Definition at line 61 of file CarrierTest.php.
64 [[], [
'carrier1' => []]],
65 [[], [
'carrier1' => [
'is_online' => 0]]],
68 [
'carrier1' => [
'is_online' => 1],
'carrier2' => [
'is_online' => 0]]
◆ testGetCarrierConfigValue()
testGetCarrierConfigValue |
( |
| ) |
|
Definition at line 73 of file CarrierTest.php.
75 $carrierCode =
'carrier1';
76 $configPath =
'title';
77 $configValue =
'some title';
78 $this->scopeConfig->expects(
83 sprintf(
'carriers/%s/%s', $carrierCode, $configPath),
84 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE
86 $this->returnValue($configValue)
88 $this->assertEquals($configValue, $this->helper->getCarrierConfigValue($carrierCode, $configPath));
◆ testGetOnlineCarrierCodes()
testGetOnlineCarrierCodes |
( |
|
$result, |
|
|
|
$carriers |
|
) |
| |
- Parameters
-
array | $result | |
array | $carriers | @dataProvider getOnlineCarrierCodesDataProvider |
Definition at line 41 of file CarrierTest.php.
43 $this->scopeConfig->expects(
49 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE
51 $this->returnValue($carriers)
53 $this->assertEquals(
$result, $this->helper->getOnlineCarrierCodes());
◆ testIsCountryInEU()
Definition at line 91 of file CarrierTest.php.
93 $this->scopeConfig->expects(
98 'general/country/eu_countries',
99 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE
101 $this->returnValue(
"GB")
104 $this->assertEquals(
true, $this->helper->isCountryInEU(
"GB"));
105 $this->assertEquals(
false, $this->helper->isCountryInEU(
"US"));
◆ $helper
◆ $scopeConfig
The documentation for this class was generated from the following file: