Example #1
0
 public function testCreateDeposit()
 {
     $account = Account::reference('ACCOUNT_ID');
     $deposit = new Deposit();
     $response = $this->getMock(ResponseInterface::class);
     $this->mapper->expects($this->any())->method('fromDeposit')->with($deposit)->willReturn(['key' => 'value']);
     $this->http->expects($this->once())->method('post')->with('/v2/accounts/ACCOUNT_ID/deposits', ['key' => 'value', 'foo' => 'bar'])->willReturn($response);
     $this->mapper->expects($this->once())->method('toDeposit')->with($response, $deposit);
     $this->client->createAccountDeposit($account, $deposit, ['foo' => 'bar']);
 }