Skip to content

Commit 04f40fd

Browse files
committed
minor #2510 [LiveComponent] Update doc on how to use submitForm (yalit)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [LiveComponent] Update doc on how to use submitForm | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | Fix #2509 | License | MIT As described in the issue, I struggled a bit with the usage of the submitForm helper for testing a LiveComponent due to the name of the form used not being correct see #2509. I propose a small update to the documentation to make it more clear how the formName should be used into the call of submitForm Commits ------- a7db6f7 [LiveComponent] Update doc on how to use submitForm
2 parents dc6e6e4 + a7db6f7 commit 04f40fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LiveComponent/doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3732,9 +3732,9 @@ uses Symfony's test client to render and make requests to your components::
37323732
->set('count', 99)
37333733
;
37343734

3735-
// Submit form data
3735+
// Submit form data ('my_form' for your MyFormType form)
37363736
$testComponent
3737-
->submitForm(['form' => ['input' => 'value']], 'save');
3737+
->submitForm(['my_form' => ['input' => 'value']], 'save');
37383738

37393739
$this->assertStringContainsString('Count: 99', $testComponent->render());
37403740

0 commit comments

Comments
 (0)