public function testGetTransactions() { $account = Account::reference('ACCOUNT_ID'); $response = $this->getMock(ResponseInterface::class); $expected = new ResourceCollection(); $this->http->expects($this->any())->method('get')->with('/v2/accounts/ACCOUNT_ID/transactions', ['foo' => 'bar'])->willReturn($response); $this->mapper->expects($this->any())->method('toTransactions')->with($response)->willReturn($expected); $actual = $this->client->getAccountTransactions($account, ['foo' => 'bar']); $this->assertSame($expected, $actual); }
public function testGetAccountTransactions() { $account = $this->client->getPrimaryAccount(); $transactions = $this->client->getAccountTransactions($account); }