/** * @test */ public function it_fetches_record_by_column() { $post = factory(Post::class)->create(['title' => 'a funky title']); $returnedPost = $this->posts->getItemByColumn('a funky title', 'title'); $this->assertEquals($post->title, $returnedPost->title); }