Skip to content

Commit 35098ee

Browse files
committed
minor #9854 Made the testing form examples consistent (javiereguiluz)
This PR was merged into the 2.8 branch. Discussion ---------- Made the testing form examples consistent This fixes #9585. Commits ------- 12de345 Made the testing form examples consistent
2 parents f93f851 + 12de345 commit 35098ee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

testing.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,8 @@ When calling the ``form()`` method, you can also pass an array of field values
655655
that overrides the default ones::
656656

657657
$form = $buttonCrawlerNode->form(array(
658-
'name' => 'Fabien',
659-
'my_form[subject]' => 'Symfony rocks!',
658+
'my_form[name]' => 'Fabien',
659+
'my_form[subject]' => 'Symfony rocks!',
660660
));
661661

662662
And if you want to simulate a specific HTTP method for the form, pass it as a
@@ -672,15 +672,15 @@ The field values can also be passed as a second argument of the ``submit()``
672672
method::
673673

674674
$client->submit($form, array(
675-
'name' => 'Fabien',
676-
'my_form[subject]' => 'Symfony rocks!',
675+
'my_form[name]' => 'Fabien',
676+
'my_form[subject]' => 'Symfony rocks!',
677677
));
678678

679679
For more complex situations, use the ``Form`` instance as an array to set the
680680
value of each field individually::
681681

682682
// changes the value of a field
683-
$form['name'] = 'Fabien';
683+
$form['my_form[name]'] = 'Fabien';
684684
$form['my_form[subject]'] = 'Symfony rocks!';
685685

686686
There is also a nice API to manipulate the values of the fields according to

0 commit comments

Comments
 (0)