Exemplo n.º 1
0
 /**
  * Render block HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (!$this->getOptions()) {
         $this->setOptions($this->countryHelper->getCountries());
     }
     return parent::_toHtml();
 }
Exemplo n.º 2
0
 /**
  * @covers \Magento\Braintree\Helper\Country::getCountries
  */
 public function testGetCountries()
 {
     $this->collection->expects(static::once())->method('toOptionArray')->willReturn([['value' => 'US', 'label' => 'United States'], ['value' => 'UK', 'label' => 'United Kingdom']]);
     $this->helper->getCountries();
     $this->collection->expects(static::never())->method('toOptionArray');
     $this->helper->getCountries();
 }