Skip to content

Commit 8ddefb3

Browse files
committed
[BrowserKit] Fix doc about submitForm behaviour
1 parent 368bfb7 commit 8ddefb3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/BrowserKit/AbstractBrowser.php

+2-2
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

+1-1
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)