/** * Returns countries array * * @return array */ public function getCountries() { if (!$this->countries) { $this->countries = $this->collectionFactory->create()->addFieldToFilter('country_id', ['nin' => $this->countryConfig->getExcludedCountries()])->loadData()->toOptionArray(false); } return $this->countries; }
/** * @covers \Magento\Braintree\Model\Adminhtml\System\Config\Country::isCountryRestricted * @param string $countryId * @dataProvider countryDataProvider */ public function testIsCountryRestricted($countryId) { static::assertTrue($this->model->isCountryRestricted($countryId)); }