Exemple #1
0
 /**
  * @dataProvider hasCcExpDateDataProvider
  */
 public function testHasCcExpDate($ccExpMonth, $ccExpYear, $expected)
 {
     $paymentInfo = $this->getMock('Magento\\Payment\\Model\\Info', ['getCcExpMonth', 'getCcExpYear'], [], '', false);
     $paymentInfo->expects($this->any())->method('getCcExpMonth')->will($this->returnValue($ccExpMonth));
     $paymentInfo->expects($this->any())->method('getCcExpYear')->will($this->returnValue($ccExpYear));
     $this->model->setData('info', $paymentInfo);
     $this->assertEquals($expected, $this->model->hasCcExpDate());
 }