public function testUnFollow()
 {
     $request = $this->createSuccessApiResponse();
     $error = $this->createErrorApiResponse();
     $this->mock->expects($this->at(1))->method('exec')->willReturn($request);
     $this->mock->expects($this->at(3))->method('exec')->willReturn($error);
     $this->assertTrue($this->provider->unFollow(1111));
     $this->assertFalse($this->provider->unFollow(1111));
 }
示例#2
0
 /** @test */
 public function unFollowInterest()
 {
     $request = $this->createSuccessApiResponse();
     $error = $this->createErrorApiResponse();
     $this->mock->shouldReceive('followMethodCall')->once()->andReturn($request);
     $this->mock->shouldReceive('followMethodCall')->once()->andReturn($error);
     $this->assertTrue($this->provider->unFollow(1111));
     $this->assertFalse($this->provider->unFollow(1111));
 }