mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
fix tests
This commit is contained in:
@@ -63,7 +63,7 @@ class PersonControllerCreateTest extends WebTestCase
|
||||
$creationForm->get(self::LASTNAME_INPUT)->setValue($lastname.'_'.uniqid());
|
||||
$creationForm->get(self::GENDER_INPUT)->select("man");
|
||||
$date = new \DateTime('1947-02-01');
|
||||
$creationForm->get(self::BIRTHDATE_INPUT)->setValue($date->format('d-m-Y'));
|
||||
$creationForm->get(self::BIRTHDATE_INPUT)->setValue($date->format('Y-m-d'));
|
||||
|
||||
return $creationForm;
|
||||
}
|
||||
@@ -114,15 +114,18 @@ class PersonControllerCreateTest extends WebTestCase
|
||||
*
|
||||
* @param Form $form
|
||||
* @return string The id of the created person
|
||||
* @depends testAddAPersonPage
|
||||
*/
|
||||
public function testValidForm(Form $form)
|
||||
public function testValidForm()
|
||||
{
|
||||
$client = $this->client;
|
||||
$crawler = $client->request('GET', '/fr/person/new');
|
||||
|
||||
$form = $crawler->selectButton("Ajouter la personne")->form();
|
||||
$this->fillAValidCreationForm($form);
|
||||
$client = $this->client;
|
||||
$crawler = $client->submit($form);
|
||||
$client->submit($form);
|
||||
|
||||
$this->assertTrue((bool)$client->getResponse()->isRedirect(),
|
||||
$this->assertTrue($client->getResponse()->isRedirect(),
|
||||
"a valid form redirect to url /{_locale}/person/{personId}/general/edit");
|
||||
$client->followRedirect();
|
||||
|
||||
|
Reference in New Issue
Block a user