@@ -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
{
@@ -124,7 +123,7 @@ before creating the parent form::
124
123
125
124
use Acme\TestBundle\Form\Type\TestedType;
126
125
use Acme\TestBundle\Model\TestObject;
127
- use Symfony\Component\Form\Tests\Extension\Core\Type \TypeTestCase;
126
+ use Symfony\Component\Form\Test \TypeTestCase;
128
127
129
128
class TestedTypeTest extends TypeTestCase
130
129
{
@@ -160,7 +159,7 @@ on other extensions. You need add those extensions to the factory object::
160
159
161
160
use Acme\TestBundle\Form\Type\TestedType;
162
161
use Acme\TestBundle\Model\TestObject;
163
- use Symfony\Component\Form\Tests\Extension\Core\Type \TypeTestCase;
162
+ use Symfony\Component\Form\Test \TypeTestCase;
164
163
165
164
class TestedTypeTest extends TypeTestCase
166
165
{
@@ -201,7 +200,7 @@ a good opportunity to use them::
201
200
202
201
use Acme\TestBundle\Form\Type\TestedType;
203
202
use Acme\TestBundle\Model\TestObject;
204
- use Symfony\Component\Form\Tests\Extension\Core\Type \TypeTestCase;
203
+ use Symfony\Component\Form\Test \TypeTestCase;
205
204
206
205
class TestedTypeTest extends TypeTestCase
207
206
{
0 commit comments