コード例 #1
0
 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
ファイル: InterestsTest.php プロジェクト: dave-ac/vSimpleMVC
 /** @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));
 }