Skip to content

Commit a3bb54c

Browse files
committed
minor #8971 Fixed an example in the form testing article (javiereguiluz)
This PR was merged into the 2.7 branch. Discussion ---------- Fixed an example in the form testing article This fixes #8970. Commits ------- 36c183e Fixed an example in the form testing article
2 parents a836af0 + 36c183e commit a3bb54c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

form/unit_testing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ The simplest ``TypeTestCase`` implementation looks like the following::
5555
$type = new TestedType();
5656
$form = $this->factory->create($type);
5757

58-
$object = TestObject::fromArray($formData);
58+
$object = new TestObject();
59+
// ...populate $object properties with the data stored in $formData
5960

6061
// submit the data to the form directly
6162
$form->submit($formData);

0 commit comments

Comments
 (0)