コード例 #1
0
ファイル: CcTypeTest.php プロジェクト: Doability/magento2dev
 /**
  * @covers \Magento\Braintree\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();
 }
コード例 #2
0
ファイル: CcTypes.php プロジェクト: Doability/magento2dev
 /**
  * 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();
 }