diff --git a/cookbook/form/unit_testing.rst b/cookbook/form/unit_testing.rst index f23b78e4a9b..9d4e840d68b 100644 --- a/cookbook/form/unit_testing.rst +++ b/cookbook/form/unit_testing.rst @@ -39,7 +39,6 @@ The simplest ``TypeTestCase`` implementation looks like the following:: // tests/AppBundle/Form/Type/TestedTypeTest.php namespace Tests\AppBundle\Form\Type; - use AppBundle\Form\Type\TestedType; use AppBundle\Model\TestObject; use Symfony\Component\Form\Test\TypeTestCase; @@ -52,7 +51,7 @@ The simplest ``TypeTestCase`` implementation looks like the following:: 'test2' => 'test2', ); - $type = new TestedType(); + $type = 'AppBundle\Form\Type\TestedType'; $form = $this->factory->create($type); $object = TestObject::fromArray($formData);