/** @test */ public function likeAPin() { $response = $this->createApiResponse(); $error = $this->createErrorApiResponse(); $this->mock->shouldReceive('exec')->once()->andReturn($response); $this->mock->shouldReceive('exec')->once()->andReturn($error); $this->assertTrue($this->provider->like(1111)); $this->assertFalse($this->provider->like(1111)); }
public function testLikeAndUnlike() { $response = $this->createApiResponse(); $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->like(1111)); $this->assertFalse($this->provider->like(1111)); }
/** @test */ public function it_should_like_pins() { $this->apiShouldReturnSuccess()->assertTrue($this->provider->like(1111)); $this->apiShouldReturnError()->assertFalse($this->provider->like(1111)); }