public function testCancel() { $this->helperMock->expects($this->once())->method('getMethodInstance')->will($this->returnValue($this->paymentMethodMock)); // check fix for partial refunds in Payflow Pro $this->paymentMethodMock->expects($this->once())->method('canVoid')->willReturn(false); $this->assertEquals($this->payment, $this->payment->cancel()); }
/** * {@inheritdoc} */ public function cancel() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'cancel'); if (!$pluginInfo) { return parent::cancel(); } else { return $this->___callPlugins('cancel', func_get_args(), $pluginInfo); } }
public function testCancel() { // check fix for partial refunds in Payflow Pro $this->paymentMethodMock->expects($this->once())->method('canVoid')->with($this->payment)->willReturn(false); $this->assertEquals($this->payment, $this->payment->cancel()); }