mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
fix test for inserting addresses
This commit is contained in:
parent
4c265ef293
commit
bd78722a6b
@ -125,12 +125,17 @@ class PersonAddressControllerTest extends WebTestCase
|
|||||||
|
|
||||||
$this->assertTrue($this->client->getResponse()->isSuccessful());
|
$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(
|
$form = $crawler->selectButton('Envoi')->form(array(
|
||||||
'address[streetAddress1]' => 'Rue de la Paix, 50',
|
'address[streetAddress1]' => 'Rue de la Paix, 50',
|
||||||
'address[streetAddress2]' => $this->postalCode->getId(),
|
'address[streetAddress2]' => $this->postalCode->getId(),
|
||||||
'address[validFrom]' => '15-01-2016'
|
'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);
|
$this->client->submit($form);
|
||||||
|
|
||||||
$crawler = $this->client->followRedirect();
|
$crawler = $this->client->followRedirect();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user