diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php index 9faf05510..5ab77ee24 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php @@ -114,14 +114,14 @@ class PersonControllerCreateTest extends WebTestCase * @param Form $form * @depends testAddAPersonPage */ - public function testGenderIsNull(Form $form) + public function testForgedNullGender(Form $form) { - $this->fillAValidCreationForm($form); - $form->get(self::GENDER_INPUT)->disableValidation()->setValue(NULL); - $crawler = $this->getAuthenticatedClient()->submit($form); - - $this->assertEquals(1, $crawler->filter('.error')->count(), - 'A message is shown if gender is not set'); + $form->get(self::FIRSTNAME_INPUT)->setValue('john'); + $form->get(self::LASTNAME_INPUT)->setValue('doe'); + $date = new \DateTime('1947-02-01'); + $form->get(self::BIRTHDATE_INPUT)->setValue($date->format('d-m-Y')); + $this->client->submit($form); + $this->assertResponseStatusCodeSame(500); } /**