public function testUpdateOnlineTransactionDeniedFalseHistoryComment() { $message = sprintf('There is no update for the payment. Transaction ID: "%s"', $this->transactionId); $storeId = 50; $orderState = Order::STATE_PAYMENT_REVIEW; $this->payment->setLastTransId($this->transactionId); $this->payment->setData('is_transaction_denied', false); $this->payment->setData('is_transaction_approved', false); $this->mockInvoice($this->transactionId); $this->orderMock->expects($this->once())->method('getState')->willReturn($orderState); $this->orderMock->expects($this->never())->method('setState'); $this->orderMock->expects($this->once())->method('addStatusHistoryComment')->with($message); $this->orderMock->expects($this->once())->method('getStoreId')->willReturn($storeId); $this->helperMock->expects($this->once())->method('getMethodInstance')->will($this->returnValue($this->paymentMethodMock)); $this->paymentMethodMock->expects($this->once())->method('setStore')->with($storeId)->willReturn($this->paymentMethodMock); $this->paymentMethodMock->expects($this->once())->method('fetchTransactionInfo')->with($this->payment, $this->transactionId); $this->payment->update(); $this->assertEquals($this->transactionId, $this->payment->getLastTransId()); }
/** * {@inheritdoc} */ public function setLastTransId($id) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setLastTransId'); if (!$pluginInfo) { return parent::setLastTransId($id); } else { return $this->___callPlugins('setLastTransId', func_get_args(), $pluginInfo); } }