/** * @covers \Magento\BraintreeTwo\Helper\CcType::getCcTypes */ public function testGetCcTypes() { $this->ccTypeSource->expects(static::once())->method('toOptionArray')->willReturn(['label' => 'VISA', 'value' => 'VI']); $this->helper->getCcTypes(); $this->ccTypeSource->expects(static::never())->method('toOptionArray'); $this->helper->getCcTypes(); }
/** * Render block HTML * * @return string */ protected function _toHtml() { if (!$this->getOptions()) { $this->setOptions($this->ccTypeHelper->getCcTypes()); } $this->setClass('cc-type-select'); $this->setExtraParams('multiple="multiple"'); return parent::_toHtml(); }