/**
  * @expectedException \AppBundle\Service\ValidationException
  * @expectedExceptionCode \AppBundle\Service\ValidationException::EMPTY_DATE_NAISSANCE
  */
 public function testCommit_dateNaissance_empty()
 {
     // Simulation d'une page animal en base de données
     $user = new User();
     $pageAnimalBranch = new PageAnimalBranch();
     $pageAnimalBranch->setOwner($user);
     $commit = new PageAnimalCommit(null, 'rodolf', $this->timeService->now(), null, PageAnimal::DISPONIBLE, PageAnimal::MALE, null);
     $commit->setId(1);
     $pageAnimalBranch->setCommit($commit);
     $this->pageAnimalBranchRepository->method('find')->willReturn($pageAnimalBranch);
     $this->pageAnimalCommitRepository->method('find')->with($commit->getId())->willReturn($commit);
     // Commit la page avec un nom vide
     $pageAnimal = $this->pageAnimalService->find($pageAnimalBranch->getId());
     $pageAnimal->setDateNaissance(null);
     $this->pageAnimalService->commit($user, $pageAnimal);
 }