/** @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]); }
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]); }
/** * @test * @expectedException \seregazhuk\PinterestBot\Exceptions\WrongFollowingType */ public function it_throws_exception_for_wrong_following_request() { $this->provider->following('test', 'unknown'); }