public function testGetReplacementGameReturnsGameWithReplacedGameIdSetToFinishedGame()
 {
     $gameManager = new GameManager();
     $replacement = $gameManager->getReplacementGame($this->game, new GameNameFinder([]));
     $this->assertEquals(1, $replacement->getReplacedGameId());
 }
 protected function createReplacementGame(Game $game, EntityManager $em)
 {
     $gameManager = new GameManager();
     $gameNameFinder = new GameNameFinder($em->getRepository('AppBundle:Game')->getGameNamesInUse());
     $replacementGame = $gameManager->getReplacementGame($game, $gameNameFinder);
     $em->persist($replacementGame);
     $em->flush();
     return $replacementGame;
 }