@@ -17,14 +17,13 @@ is done in a real application. It is simple to bootstrap and you can trust
17
17
the Symfony components enough to use them as a testing base.
18
18
19
19
There is already a class that you can benefit from for simple FormTypes
20
- testing: :class: `Symfony\\ Component\\ Form\\ Tests \\ Extension \\ Core \\ Type \\ TypeTestCase `.
21
- It is used to test the core types and you can use it to test your types too.
20
+ testing: :class: `Symfony\\ Component\\ Form\\ Test \\ TypeTestCase `. It is used to
21
+ test the core types and you can use it to test your types too.
22
22
23
- .. note ::
24
-
25
- Depending on the way you installed your Symfony or Symfony Form Component
26
- the tests may not be downloaded. Use the --prefer-source option with
27
- composer if this is the case.
23
+ .. versionadded :: 2.3
24
+ The ``TypeTestCase `` has moved to the ``Symfony\Component\Form\Test ``
25
+ namespace in 2.3. Previously, the class was located in
26
+ ``Symfony\Component\Form\Tests\Core\Extension\Type ``.
28
27
29
28
The Basics
30
29
----------
@@ -36,7 +35,7 @@ The simplest ``TypeTestCase`` implementation looks like the following::
36
35
37
36
use Acme\TestBundle\Form\Type\TestedType;
38
37
use Acme\TestBundle\Model\TestObject;
39
- use Symfony\Component\Form\Tests\Extension\Core\Type \TypeTestCase;
38
+ use Symfony\Component\Form\Test \TypeTestCase;
40
39
41
40
class TestedTypeTest extends TypeTestCase
42
41
{
@@ -125,7 +124,7 @@ before creating the parent form::
125
124
126
125
use Acme\TestBundle\Form\Type\TestedType;
127
126
use Acme\TestBundle\Model\TestObject;
128
- use Symfony\Component\Form\Tests\Extension\Core\Type \TypeTestCase;
127
+ use Symfony\Component\Form\Test \TypeTestCase;
129
128
130
129
class TestedTypeTest extends TypeTestCase
131
130
{
@@ -161,7 +160,7 @@ on other extensions. You need add those extensions to the factory object::
161
160
162
161
use Acme\TestBundle\Form\Type\TestedType;
163
162
use Acme\TestBundle\Model\TestObject;
164
- use Symfony\Component\Form\Tests\Extension\Core\Type \TypeTestCase;
163
+ use Symfony\Component\Form\Test \TypeTestCase;
165
164
166
165
class TestedTypeTest extends TypeTestCase
167
166
{
@@ -202,7 +201,7 @@ a good opportunity to use them::
202
201
203
202
use Acme\TestBundle\Form\Type\TestedType;
204
203
use Acme\TestBundle\Model\TestObject;
205
- use Symfony\Component\Form\Tests\Extension\Core\Type \TypeTestCase;
204
+ use Symfony\Component\Form\Test \TypeTestCase;
206
205
207
206
class TestedTypeTest extends TypeTestCase
208
207
{
0 commit comments