public function testGetAddressTransactions()
 {
     $account = $this->createAccount();
     $address = new Address();
     $address->setName('foo');
     $this->client->createAccountAddress($account, $address);
     $transactions = $this->client->getAddressTransactions($address);
     $this->assertEmpty($transactions);
 }
Example #2
0
 public function testCreateAddress()
 {
     $account = Account::reference('ACCOUNT_ID');
     $address = new Address();
     $response = $this->getMock(ResponseInterface::class);
     $this->mapper->expects($this->any())->method('fromAddress')->with($address)->willReturn(['key' => 'value']);
     $this->http->expects($this->once())->method('post')->with('/v2/accounts/ACCOUNT_ID/addresses', ['key' => 'value', 'foo' => 'bar'])->willReturn($response);
     $this->mapper->expects($this->once())->method('toAddress')->with($response, $address);
     $this->client->createAccountAddress($account, $address, ['foo' => 'bar']);
 }