public function testConstructeur()
 {
     $tentative = new Tentative($this->container->get('ma_contenu.format'));
     $date = $tentative->getDate();
     $expected = new \DateTime();
     $diff = $date->diff($expected)->s;
     $this->assertTrue($diff < 5, 'date mal initialisée');
 }
 private function newEntity($param)
 {
     $tentative = new Tentative($this->container->get('ma_contenu.format'));
     $tentative->setDate($param['date']);
     $tentative->setDuree($param['duree']);
     $tentative->setScore($param['score']);
     $tentative->setUser($param['user']);
     $tentative->setContenu($param['contenu']);
     $this->manager->persist($tentative);
     $this->addReference('tentative-' . $param['id'], $tentative);
 }