Esempio n. 1
0
 /** @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());
 }
Esempio n. 2
0
 /**
  * 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);
     });
 }