Esempio n. 1
0
 /** @test */
 public function createCommentForPin()
 {
     $response = $this->createApiResponse();
     $error = $this->createErrorApiResponse();
     $this->mock->shouldReceive('exec')->once()->andReturn($response);
     $this->mock->shouldReceive('exec')->once()->andReturn($error);
     $this->assertNotEmpty($this->provider->comment(1111, 'comment text'));
     $this->assertFalse($this->provider->comment(1111, 'comment text'));
 }
Esempio n. 2
0
 public function testCreateComment()
 {
     $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->assertNotEmpty($this->provider->comment(1111, 'comment text'));
     $this->assertFalse($this->provider->comment(1111, 'comment text'));
 }