public function findByUSerId($id)
 {
     $games = [];
     for ($i = 0; $i < 6; $i++) {
         $game = new Game($i);
         $game->setTitle("Game ." . $i);
         $game->setImagePath("images/game.jpg");
         $rating = new Rating();
         $rating->setScore(4.5);
         $game->setRatings([$rating]);
         $games[] = $game;
     }
     return $games;
 }
示例#2
0
 public function testImage_WithPath_ReturnPath()
 {
     $game = new Game();
     $game->setImagePath("/images/game.jpg");
     $this->assertEquals('/images/game.jpg', $game->getImagePath());
 }