/** * @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(); }
/** * @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()); }