Beispiel #1
0
 /** @test */
 public function unFollowBoard()
 {
     $response = $this->createSuccessApiResponse();
     $error = $this->createErrorApiResponse();
     $this->mock->shouldReceive('followMethodCall')->once()->andReturn($response);
     $this->mock->shouldReceive('followMethodCall')->once()->andReturn($error);
     $this->assertTrue($this->provider->unFollow(1));
     $this->assertFalse($this->provider->unFollow(1));
 }
 public function testUnFollow()
 {
     $response = $this->createSuccessApiResponse();
     $error = $this->createErrorApiResponse();
     $this->mock->expects($this->at(1))->method('exec')->willReturn($response);
     $this->mock->expects($this->at(3))->method('exec')->willReturn($error);
     $this->assertTrue($this->provider->unFollow(1));
     $this->assertFalse($this->provider->unFollow(1));
 }
 /** @test */
 public function it_should_unfollow_boards()
 {
     $boardId = 1;
     $this->apiShouldFollowTo($boardId, UrlBuilder::RESOURCE_UNFOLLOW_BOARD)->assertTrue($this->provider->unFollow($boardId));
     $this->apiShouldNotFollow($boardId, UrlBuilder::RESOURCE_UNFOLLOW_BOARD)->assertFalse($this->provider->unFollow($boardId));
 }