From 62aee7c191f36552223b7a0c257e51338b8bd889 Mon Sep 17 00:00:00 2001 From: Yoann Renard Date: Tue, 2 Jun 2020 17:50:48 +0200 Subject: [PATCH] Fix form unit testing code sample --- form/unit_testing.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/form/unit_testing.rst b/form/unit_testing.rst index bc7da36f443..7ea984c0a9b 100644 --- a/form/unit_testing.rst +++ b/form/unit_testing.rst @@ -54,9 +54,9 @@ The simplest ``TypeTestCase`` implementation looks like the following:: 'test2' => 'test2', ]; - $formData = new TestObject(); + $model = new TestObject(); // $formData will retrieve data from the form submission; pass it as the second argument - $form = $this->factory->create(TestedType::class, $formData); + $form = $this->factory->create(TestedType::class, $model); $expected = new TestObject(); // ...populate $object properties with the data stored in $formData @@ -68,7 +68,7 @@ The simplest ``TypeTestCase`` implementation looks like the following:: $this->assertTrue($form->isSynchronized()); // check that $formData was modified as expected when the form was submitted - $this->assertEquals($expected, $formData); + $this->assertEquals($expected, $model); } public function testCustomFormView()