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