Skip to content

fix types #6199

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

Closed
wants to merge 2 commits into from
Closed
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
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 @@ -139,7 +139,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 @@ -148,7 +148,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