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 8ddefb3

Browse filesBrowse files
committed
[BrowserKit] Fix doc about submitForm behaviour
1 parent 368bfb7 commit 8ddefb3
Copy full SHA for 8ddefb3

File tree

2 files changed

+3
-3
lines changed
Filter options

2 files changed

+3
-3
lines changed

‎src/Symfony/Component/BrowserKit/AbstractBrowser.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/BrowserKit/AbstractBrowser.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public function submit(Form $form, array $values = [], array $serverParameters =
309309
* Finds the first form that contains a button with the given content and
310310
* uses it to submit the given form field values.
311311
*
312-
* @param string $button The text content, id, value or name of the form <button> or <input type="submit">
312+
* @param string $button The text content, id or name of the form <button> or <input type="submit">
313313
* @param array $fieldValues Use this syntax: ['my_form[name]' => '...', 'my_form[email]' => '...']
314314
* @param string $method The HTTP method used to submit the form
315315
* @param array $serverParameters These values override the ones stored in $_SERVER (HTTP headers must include an HTTP_ prefix as PHP does)
@@ -320,7 +320,7 @@ public function submitForm(string $button, array $fieldValues = [], string $meth
320320
$buttonNode = $crawler->selectButton($button);
321321

322322
if (0 === $buttonNode->count()) {
323-
throw new InvalidArgumentException(sprintf('There is no button with "%s" as its content, id, value or name.', $button));
323+
throw new InvalidArgumentException(sprintf('There is no button with "%s" as its content, id or name.', $button));
324324
}
325325

326326
$form = $buttonNode->form($fieldValues, $method);

‎src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ public function testSubmitFormNotFound()
390390
$client->request('GET', 'http://www.example.com/foo/foobar');
391391

392392
$this->expectExceptionObject(
393-
new InvalidArgumentException('There is no button with "Register" as its content, id, value or name.')
393+
new InvalidArgumentException('There is no button with "Register" as its content, id or name.')
394394
);
395395

396396
$client->submitForm('Register', [

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.