/** @test */ public function followBoard() { $response = $this->createSuccessApiResponse(); $error = $this->createErrorApiResponse(); $this->mock->shouldReceive('followMethodCall')->once()->andReturn($response); $this->mock->shouldReceive('followMethodCall')->once()->andReturn($error); $this->assertTrue($this->provider->follow(1)); $this->assertFalse($this->provider->follow(1)); }
public function testFollow() { $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->follow(1)); $this->assertFalse($this->provider->follow(1)); }
/** @test */ public function it_should_follow_boards() { $boardId = 1; $this->apiShouldFollowTo($boardId, UrlBuilder::RESOURCE_FOLLOW_BOARD)->assertTrue($this->provider->follow($boardId)); $this->apiShouldNotFollow($boardId, UrlBuilder::RESOURCE_FOLLOW_BOARD)->assertFalse($this->provider->follow($boardId)); }