Exemplo n.º 1
0
 public function testProcessCompletedSuccess()
 {
     $payuplOrderId = 'ABC';
     $status = 'COMPLETED';
     $amount = 2.22;
     $order = $this->getOrderMock();
     $this->orderHelper->expects($this->once())->method('loadOrderByPayuplOrderId')->willReturn($order);
     $this->orderHelper->expects($this->once())->method('completePayment')->with($this->equalTo($order), $this->equalTo($amount));
     $this->transactionService->expects($this->once())->method('updateStatus')->with($this->equalTo($payuplOrderId), $this->equalTo($status), $this->equalTo(true));
     $this->model->processCompleted($payuplOrderId, $status, $amount);
 }