Skip to content

Commit f7923b8

Browse files
committed
Fix form unit testing code sample
1 parent 58fba0d commit f7923b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

form/unit_testing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ The simplest ``TypeTestCase`` implementation looks like the following::
5454
'test2' => 'test2',
5555
];
5656

57-
$formData = new TestObject();
57+
$objectToCompare = new TestObject();
5858
// $formData will retrieve data from the form submission; pass it as the second argument
59-
$form = $this->factory->create(TestedType::class, $formData);
59+
$form = $this->factory->create(TestedType::class, $objectToCompare);
6060

6161
$expected = new TestObject();
6262
// ...populate $object properties with the data stored in $formData
@@ -68,7 +68,7 @@ The simplest ``TypeTestCase`` implementation looks like the following::
6868
$this->assertTrue($form->isSynchronized());
6969

7070
// check that $formData was modified as expected when the form was submitted
71-
$this->assertEquals($expected, $formData);
71+
$this->assertEquals($expected, $objectToCompare);
7272
}
7373

7474
public function testCustomFormView()

0 commit comments

Comments
 (0)