Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit40af9fa

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents4c5b0c4 +69d65a7 commit40af9fa

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

‎cookbook/form/unit_testing.rst‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ is done in a real application. It is simple to bootstrap and you can trust
1717
the Symfony components enough to use them as a testing base.
1818

1919
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 totest 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.
2222

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``.
2827

2928
The Basics
3029
----------
@@ -36,7 +35,7 @@ The simplest ``TypeTestCase`` implementation looks like the following::
3635

3736
use Acme\TestBundle\Form\Type\TestedType;
3837
use Acme\TestBundle\Model\TestObject;
39-
use Symfony\Component\Form\Tests\Extension\Core\Type\TypeTestCase;
38+
use Symfony\Component\Form\Test\TypeTestCase;
4039

4140
class TestedTypeTest extends TypeTestCase
4241
{
@@ -125,7 +124,7 @@ before creating the parent form::
125124

126125
use Acme\TestBundle\Form\Type\TestedType;
127126
use Acme\TestBundle\Model\TestObject;
128-
use Symfony\Component\Form\Tests\Extension\Core\Type\TypeTestCase;
127+
use Symfony\Component\Form\Test\TypeTestCase;
129128

130129
class TestedTypeTest extends TypeTestCase
131130
{
@@ -161,7 +160,7 @@ on other extensions. You need add those extensions to the factory object::
161160

162161
use Acme\TestBundle\Form\Type\TestedType;
163162
use Acme\TestBundle\Model\TestObject;
164-
use Symfony\Component\Form\Tests\Extension\Core\Type\TypeTestCase;
163+
use Symfony\Component\Form\Test\TypeTestCase;
165164

166165
class TestedTypeTest extends TypeTestCase
167166
{
@@ -202,7 +201,7 @@ a good opportunity to use them::
202201

203202
use Acme\TestBundle\Form\Type\TestedType;
204203
use Acme\TestBundle\Model\TestObject;
205-
use Symfony\Component\Form\Tests\Extension\Core\Type\TypeTestCase;
204+
use Symfony\Component\Form\Test\TypeTestCase;
206205

207206
class TestedTypeTest extends TypeTestCase
208207
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp