@@ -158,15 +158,17 @@ before creating the parent form using the ``PreloadedExtension`` class::
158
158
be getting errors that are not related to the form you are currently
159
159
testing but to its children.
160
160
161
- Adding custom Extensions
161
+ Adding Custom Extensions
162
162
------------------------
163
163
164
164
It often happens that you use some options that are added by
165
165
:doc: `form extensions </cookbook/form/create_form_type_extension >`. One of the
166
166
cases may be the ``ValidatorExtension `` with its ``invalid_message `` option.
167
- The ``TypeTestCase `` loads only the core form extension so an "Invalid option"
168
- exception will be raised if you try to use it for testing a class that depends
169
- on other extensions. You need to add those extensions to the factory object::
167
+ The ``TypeTestCase `` only loads the core form extension, which means an
168
+ "Invalid option" exception will be raised if you try to test a class that
169
+ depends on other extensions. The
170
+ :method: `Symfony\C omponent\F orm\T est\T ypeTestCase::getExtensions ` allows you to
171
+ return a list of extensions to register::
170
172
171
173
// src/AppBundle/Tests/Form/Type/TestedTypeTests.php
172
174
namespace AppBundle\Tests\Form\Type;
@@ -194,7 +196,7 @@ on other extensions. You need to add those extensions to the factory object::
194
196
// ... your tests
195
197
}
196
198
197
- Testing against different Sets of Data
199
+ Testing against Different Sets of Data
198
200
--------------------------------------
199
201
200
202
If you are not familiar yet with PHPUnit's `data providers `_, this might be
0 commit comments