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

Made the testing form examples consistent #9854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Made the testing form examples consistent
  • Loading branch information
javiereguiluz committed May 30, 2018
commit 12de3451746890b922e238d27dbc4004cd6c75a0
10 changes: 5 additions & 5 deletions 10 testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,8 @@ When calling the ``form()`` method, you can also pass an array of field values
that overrides the default ones::

$form = $buttonCrawlerNode->form(array(
'name' => 'Fabien',
'my_form[subject]' => 'Symfony rocks!',
'my_form[name]' => 'Fabien',
'my_form[subject]' => 'Symfony rocks!',
));

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

$client->submit($form, array(
'name' => 'Fabien',
'my_form[subject]' => 'Symfony rocks!',
'my_form[name]' => 'Fabien',
'my_form[subject]' => 'Symfony rocks!',
));

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

// changes the value of a field
$form['name'] = 'Fabien';
$form['my_form[name]'] = 'Fabien';
$form['my_form[subject]'] = 'Symfony rocks!';

There is also a nice API to manipulate the values of the fields according to
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.