/** @test */
 public function it_should_return_generator_for_boards_followers()
 {
     $this->apiShouldReturnPagination()->apiShouldReturnEmpty();
     $boardId = 1;
     $followers = $this->provider->followers($boardId);
     $this->assertIsPaginatedResponse($followers);
 }
示例#2
0
 /** @test */
 public function getBoardFollowers()
 {
     $response = $this->createPaginatedResponse();
     $this->mock->shouldReceive('exec')->once()->andReturn($response);
     $this->mock->shouldReceive('exec')->once()->andReturn(['resource_response' => ['data' => []]]);
     $this->mock->shouldReceive('exec')->once()->andReturn(['resource_response' => ['data' => [['type' => 'module']]]]);
     $followers = $this->provider->followers(111);
     $this->assertCount(2, iterator_to_array($followers)[0]);
     $followers = $this->provider->followers(111);
     $this->assertEmpty(iterator_to_array($followers));
 }