Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 35098ee

Browse filesBrowse 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
Copy full SHA for 35098ee

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎testing.rst

Copy file name to clipboardExpand all lines: testing.rst
+5-5Lines changed: 5 additions & 5 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.