From 36c183e923c9e5628ce5987e89158ba698b3ec1e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 3 Jan 2018 16:11:42 +0100 Subject: [PATCH] Fixed an example in the form testing article --- form/unit_testing.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);