Example #1
0
 public function testCommitWithdrawal()
 {
     $withdrawal = Withdrawal::reference('ACCOUNT_ID', 'WITHDRAWAL_ID');
     $response = $this->getMock(ResponseInterface::class);
     $this->http->expects($this->once())->method('post')->with('/v2/accounts/ACCOUNT_ID/withdrawals/WITHDRAWAL_ID/commit', ['foo' => 'bar'])->willReturn($response);
     $this->mapper->expects($this->once())->method('toWithdrawal')->with($response, $withdrawal);
     $this->client->commitWithdrawal($withdrawal, ['foo' => 'bar']);
 }