execute() public method

public execute ( Payum\Core\Request\Payout $request )
$request Payum\Core\Request\Payout
Beispiel #1
0
 /**
  * @test
  */
 public function shouldDoMasspayRequestIfModelNotAcknowledge()
 {
     $payoutModel = new \ArrayObject(['bar' => 'barVal']);
     $gatewayMock = $this->createGatewayMock();
     $gatewayMock->expects($this->once())->method('execute')->with($this->isInstanceOf(Masspay::class))->will($this->returnCallback(function (Masspay $request) {
         $model = $request->getModel();
         $model['foo'] = 'fooVal';
     }));
     $action = new PayoutAction();
     $action->setGateway($gatewayMock);
     $action->execute(new Payout($payoutModel));
     $this->assertEquals(['foo' => 'fooVal', 'bar' => 'barVal'], (array) $payoutModel);
 }