Esempio n. 1
0
 public function testIndexFail()
 {
     PostRepository::shouldReceive('find')->once()->with(1, ['id']);
     $content = $this->call('GET', 'blog/posts/1/comments', [], [], [], ['HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest'])->getContent();
     $this->assertResponseStatus(404);
     $this->assertEquals('{"success":false,"code":404,"msg":"The post you were viewing has been deleted.","url":"http:\\/\\/localhost\\/blog\\/posts"}', $content);
 }
Esempio n. 2
0
 public function testIndexFail()
 {
     PostRepository::shouldReceive('find')->once()->with(1, ['id']);
     $this->get('blog/posts/1/comments');
     $this->assertEquals(404, $this->response->status());
 }