public function testCommentResult() { $result = $this->service->getCommentsByEntry(1); $this->assertSame(20, $result->count()); $result = $this->service->getCommentsByEntry(10); $this->assertSame(0, $result->count()); }
/** * @param $id * * @return \Illuminate\View\View */ public function show($id) { $attributes = ['entry' => $this->entry->getEntry($id), 'comments' => $this->comment->getCommentsByEntry($id)]; return view('entry.show', $attributes); }