예제 #1
0
 /**
  * @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
 /**
  * Create mock for credit card type
  */
 private function initCcTypeMock()
 {
     $this->ccType = $this->getMockBuilder(CcType::class)->disableOriginalConstructor()->setMethods(['getCcTypeLabelMap'])->getMock();
     $this->ccType->expects(static::any())->method('getCcTypeLabelMap')->willReturn(self::$baseCardTypes);
 }