/** * @test */ public function it_fetches_record_by_id() { $post = factory(Post::class)->create(); $returnedPost = $this->posts->getById(1); $this->assertEquals($post->title, $returnedPost->title); $this->assertEquals($post->body, $returnedPost->body); }