/** @test */ public function it_should_return_correct_votes_eloquent() { $gistFromEloquent = Gist::fromEloquent($this->buildEloquentGist()); // gists via eloquent don't track votes at this time $this->assertCount(0, $gistFromEloquent->getPositiveVotes()); $this->assertCount(0, $gistFromEloquent->getNegativeVotes()); }
/** * Returns a collection of correctly formed gist objects. * * @param $gists * @return Collection */ protected function createGistCollection($gists) { return collect($gists)->map(function ($gist) { return Gist::fromEloquent($gist); }); }