From 2c14b65b5257c793589e3c669606f3292ad89e0a Mon Sep 17 00:00:00 2001 From: Denis Togbe Date: Wed, 9 Sep 2015 13:00:09 +0100 Subject: [PATCH] Fix grammar and CS --- cookbook/form/unit_testing.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/form/unit_testing.rst b/cookbook/form/unit_testing.rst index 12b5e372109..5c6a0c8011b 100644 --- a/cookbook/form/unit_testing.rst +++ b/cookbook/form/unit_testing.rst @@ -137,6 +137,7 @@ before creating the parent form using the ``PreloadedExtension`` class:: protected function getExtensions() { $childType = new TestChildType(); + return array(new PreloadedExtension(array( $childType->getName() => $childType, ), array())); @@ -165,7 +166,7 @@ It often happens that you use some options that are added by cases may be the ``ValidatorExtension`` with its ``invalid_message`` option. The ``TypeTestCase`` loads only the core form extension so an "Invalid option" exception will be raised if you try to use it for testing a class that depends -on other extensions. You need add those extensions to the factory object:: +on other extensions. You need to add those extensions to the factory object:: // src/AppBundle/Tests/Form/Type/TestedTypeTests.php namespace AppBundle\Tests\Form\Type;