Example #1
0
 /**
  * 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;
 }
Example #2
0
 /**
  * @covers \Magento\Braintree\Model\Adminhtml\System\Config\Country::isCountryRestricted
  * @param string $countryId
  * @dataProvider countryDataProvider
  */
 public function testIsCountryRestricted($countryId)
 {
     static::assertTrue($this->model->isCountryRestricted($countryId));
 }