mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix test for inserting addresses
This commit is contained in:
parent
4c265ef293
commit
bd78722a6b
@ -125,14 +125,19 @@ class PersonAddressControllerTest extends WebTestCase
|
||||
|
||||
$this->assertTrue($this->client->getResponse()->isSuccessful());
|
||||
|
||||
// get the form and populate the most obvious fields (postcode will come later)
|
||||
$form = $crawler->selectButton('Envoi')->form(array(
|
||||
'address[streetAddress1]' => 'Rue de la Paix, 50',
|
||||
'address[streetAddress2]' => $this->postalCode->getId(),
|
||||
'address[validFrom]' => '15-01-2016'
|
||||
));
|
||||
|
||||
// select a random postal code
|
||||
$values = $form['address[postCode]']->availableOptionValues();
|
||||
$form['address[postCode]']->setValue($values[array_rand($values)]);
|
||||
|
||||
$this->client->submit($form);
|
||||
|
||||
|
||||
$crawler = $this->client->followRedirect();
|
||||
|
||||
$this->assertRegexp('|/fr/person/[0-9]{1,}/address/list|',
|
||||
|
Loading…
x
Reference in New Issue
Block a user