public function testFollow()
 {
     $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->follow(1111));
     $this->assertFalse($this->provider->follow(1111));
 }
示例#2
0
 /** @test */
 public function followInterest()
 {
     $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(1111));
     $this->assertFalse($this->provider->follow(1111));
 }