Пример #1
0
 /**
  * @param AddressHelper $addressHelper
  * @param Session $customerSession
  * @param CustomerRepository $customerRepository
  * @param DirectoryHelper $directoryHelper
  */
 public function __construct(AddressHelper $addressHelper, Session $customerSession, CustomerRepository $customerRepository, DirectoryHelper $directoryHelper)
 {
     $this->addressHelper = $addressHelper;
     $this->customerSession = $customerSession;
     $this->customerRepository = $customerRepository;
     $this->directoryHelper = $directoryHelper;
     $this->topCountryCodes = $directoryHelper->getTopCountryCodes();
 }
Пример #2
0
 /**
  * @param string $topCountriesValue
  * @param array $expectedResult
  * @dataProvider topCountriesDataProvider
  */
 public function testGetTopCountryCodesReturnsParsedConfigurationValue($topCountriesValue, $expectedResult)
 {
     $this->scopeConfigMock->expects($this->once())->method('getValue')->with(\Magento\Directory\Helper\Data::XML_PATH_TOP_COUNTRIES)->willReturn($topCountriesValue);
     $this->assertEquals($expectedResult, $this->_object->getTopCountryCodes());
 }