following() публичный Метод

Get following info for pinner.
public following ( string $username, string $type = UrlBuilder::FOLLOWING_PEOPLE, integer $limit = Pagination::DEFAULT_LIMIT ) : Iterator
$username string
$type string
$limit integer
Результат Iterator
Пример #1
0
 /** @test */
 public function getFollowingUsers()
 {
     $response = $this->createPaginatedResponse();
     $this->mock->shouldReceive('exec')->once()->andReturn($response);
     $this->mock->shouldReceive('exec')->once()->andReturn(['resource_response' => ['data' => []]]);
     $following = $this->provider->following('username');
     $this->assertCount(2, iterator_to_array($following)[0]);
 }
Пример #2
0
 public function testGetFollowing()
 {
     $response = $this->createPaginatedResponse();
     $this->mock->expects($this->at(0))->method('exec')->willReturn($response);
     $this->mock->expects($this->at(1))->method('exec')->willReturn(['resource_response' => ['data' => []]]);
     $following = $this->provider->following('username');
     $this->assertCount(2, iterator_to_array($following)[0]);
 }
Пример #3
0
 /**
  * @test
  * @expectedException \seregazhuk\PinterestBot\Exceptions\WrongFollowingType
  */
 public function it_throws_exception_for_wrong_following_request()
 {
     $this->provider->following('test', 'unknown');
 }