fix last test

This commit is contained in:
Julien Fastré 2014-12-07 23:15:48 +01:00
parent cfc881096c
commit 10da02f9ba

View File

@ -142,13 +142,18 @@ class PersonControllerTest extends WebTestCase
'A message is shown if gender is not set'); 'A message is shown if gender is not set');
} }
/**
*
* @param Form $form
* @depends testAddAPersonPage
*/
public function testValidForm(Form $form) public function testValidForm(Form $form)
{ {
$this->fillAValidCreationForm($form); $this->fillAValidCreationForm($form);
$client = $this->getAuthenticatedClient(); $client = $this->getAuthenticatedClient();
$client->submit($form); $client->submit($form);
$this->assertTrue($client->isRedirection(), $this->assertTrue($client->getResponse()->isRedirect(),
"a valid form redirect to url /{_locale}/person/{personId}/general/edit"); "a valid form redirect to url /{_locale}/person/{personId}/general/edit");
$client->followRedirect(); $client->followRedirect();
$this->assertRegExpl('^/fr/person/[0-9]*/general/edit', $this->assertRegExpl('^/fr/person/[0-9]*/general/edit',