public function testThatCreatedAtIsCreatedWhenAnNewGameIsSaved() { $game = new Game(new RandomHeadTailsGenerator()); $game->setName('Wyoming'); $this->assertNull($game->getCreatedAt()); $this->em->persist($game); $this->assertInstanceOf('\\DateTime', $game->getCreatedAt()); }