Inheritance: extends Provider, use trait seregazhuk\PinterestBot\Api\Traits\Searchable, use trait seregazhuk\PinterestBot\Api\Traits\Followable
 public function testLoginFails()
 {
     $response = $this->createErrorApiResponse();
     $this->mock->method('isLoggedIn')->willReturn(false);
     $this->mock->method('exec')->willReturn($response);
     $this->assertFalse($this->provider->login('test', 'test'));
 }
Example #2
0
 /**
  * @test
  * @expectedException \seregazhuk\PinterestBot\Exceptions\AuthException
  */
 public function loginFails()
 {
     $response = $this->createErrorApiResponse();
     $this->mock->shouldReceive('isLoggedIn')->andReturn(false);
     $this->mock->shouldReceive('exec')->andReturn($response);
     $this->mock->shouldReceive('clearToken');
     $this->provider->login('test', 'test');
 }
 /**
  * @test
  * @expectedException \seregazhuk\PinterestBot\Exceptions\WrongFollowingType
  */
 public function it_throws_exception_for_wrong_following_request()
 {
     $this->provider->following('test', 'unknown');
 }