Example #1
0
 public function testLoadNextTransactions()
 {
     /** @var \PHPUnit_Framework_MockObject_MockObject|ResourceCollection $addresses */
     $addresses = $this->getMock(ResourceCollection::class);
     $response = $this->getMock(ResponseInterface::class);
     $nextPage = new ResourceCollection();
     $addresses->expects($this->any())->method('getNextUri')->willReturn('/test/next/uri');
     $this->http->expects($this->any())->method('get')->with('/test/next/uri', ['foo' => 'bar'])->willReturn($response);
     $this->mapper->expects($this->any())->method('toTransactions')->willReturn($nextPage);
     $addresses->expects($this->once())->method('mergeNextPage')->with($nextPage);
     $this->client->loadNextTransactions($addresses, ['foo' => 'bar']);
 }