diff --git a/form/unit_testing.rst b/form/unit_testing.rst index 53d82d2171b..4d8b9e2e3ae 100644 --- a/form/unit_testing.rst +++ b/form/unit_testing.rst @@ -55,7 +55,8 @@ The simplest ``TypeTestCase`` implementation looks like the following:: $type = new TestedType(); $form = $this->factory->create($type); - $object = TestObject::fromArray($formData); + $object = new TestObject(); + // ...populate $object properties with the data stored in $formData // submit the data to the form directly $form->submit($formData);