示例#1
0
 public function testGetDeposit()
 {
     $account = Account::reference('ACCOUNT_ID');
     $expected = new Deposit();
     $response = $this->getMock(ResponseInterface::class);
     $this->http->expects($this->any())->method('get')->with('/v2/accounts/ACCOUNT_ID/deposits/DEPOSIT_ID', ['foo' => 'bar'])->willReturn($response);
     $this->mapper->expects($this->any())->method('toDeposit')->with($response)->willReturn($expected);
     $actual = $this->client->getAccountDeposit($account, 'DEPOSIT_ID', ['foo' => 'bar']);
     $this->assertSame($expected, $actual);
 }