Skip to content

Added note about using the Validator TypeTestCase in form unit testing #7587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions form/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ To create your form correctly, you need to make the type available to the
form factory in your test. The easiest way is to register it manually
before creating the parent form using the ``PreloadedExtension`` class::

// src/AppBundle/Tests/Form/Type/TestedTypeTests.php
// src/AppBundle/Tests/Form/Type/TestedTypeTest.php
namespace AppBundle\Tests\Form\Type;

use AppBundle\Form\Type\TestedType;
Expand Down Expand Up @@ -169,7 +169,7 @@ will be raised if you try to test a class that depends on other extensions.
The :method:`Symfony\\Component\\Form\\Test\\TypeTestCase::getExtensions` method
allows you to return a list of extensions to register::

// src/AppBundle/Tests/Form/Type/TestedTypeTests.php
// src/AppBundle/Tests/Form/Type/TestedTypeTest.php
namespace AppBundle\Tests\Form\Type;

use AppBundle\Form\Type\TestedType;
Expand Down Expand Up @@ -210,7 +210,7 @@ Testing against Different Sets of Data
If you are not familiar yet with PHPUnit's `data providers`_, this might be
a good opportunity to use them::

// src/AppBundle/Tests/Form/Type/TestedTypeTests.php
// src/AppBundle/Tests/Form/Type/TestedTypeTest.php
namespace AppBundle\Tests\Form\Type;

use AppBundle\Form\Type\TestedType;
Expand Down