Skip to content

Commit

Permalink
minor symfony#6199 fix types (garak)
Browse files Browse the repository at this point in the history
This PR was submitted for the 3.0 branch but it was merged into the 2.8 branch instead (closes symfony#6199).

Discussion
----------

fix types

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 3.0, master
| Fixed tickets |

Commits
-------

fcdb82b fix types
  • Loading branch information
xabbuh committed Jan 31, 2016
2 parents 372704b + fcdb82b commit bce32e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cookbook/form/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The simplest ``TypeTestCase`` implementation looks like the following::
'test2' => 'test2',
);

$type = new TestedType();
$type = TestedType::class;
$form = $this->factory->create($type);

$object = TestObject::fromArray($formData);
Expand All @@ -78,7 +78,7 @@ First you verify if the ``FormType`` compiles. This includes basic class
inheritance, the ``buildForm`` function and options resolution. This should
be the first test you write::

$type = new TestedType();
$type = TestedType::class;
$form = $this->factory->create($type);

This test checks that none of your data transformers used by the form
Expand Down Expand Up @@ -136,7 +136,7 @@ before creating the parent form using the ``PreloadedExtension`` class::
{
protected function getExtensions()
{
$childType = new TestChildType();
$childType = TestChildType::class;

return array(new PreloadedExtension(array(
$childType->getName() => $childType,
Expand All @@ -145,7 +145,7 @@ before creating the parent form using the ``PreloadedExtension`` class::

public function testSubmitValidData()
{
$type = new TestedType();
$type = TestedType::class;
$form = $this->factory->create($type);

// ... your test
Expand Down

0 comments on commit bce32e2

Please sign in to comment.