Пример #1
0
 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'));
 }
Пример #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');
 }