コード例 #1
0
 public function testLoadNextWithdrawals()
 {
     /** @var \PHPUnit_Framework_MockObject_MockObject|ResourceCollection $withdrawals */
     $withdrawals = $this->getMock(ResourceCollection::class);
     $response = $this->getMock(ResponseInterface::class);
     $nextPage = new ResourceCollection();
     $withdrawals->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('toWithdrawals')->willReturn($nextPage);
     $withdrawals->expects($this->once())->method('mergeNextPage')->with($nextPage);
     $this->client->loadNextWithdrawals($withdrawals, ['foo' => 'bar']);
 }