@@ -52,7 +52,7 @@ The simplest ``TypeTestCase`` implementation looks like the following::
52
52
'test2' => 'test2',
53
53
);
54
54
55
- $type = new TestedType() ;
55
+ $type = TestedType::class ;
56
56
$form = $this->factory->create($type);
57
57
58
58
$object = TestObject::fromArray($formData);
@@ -78,7 +78,7 @@ First you verify if the ``FormType`` compiles. This includes basic class
78
78
inheritance, the ``buildForm `` function and options resolution. This should
79
79
be the first test you write::
80
80
81
- $type = new TestedType() ;
81
+ $type = TestedType::class ;
82
82
$form = $this->factory->create($type);
83
83
84
84
This test checks that none of your data transformers used by the form
@@ -136,7 +136,7 @@ before creating the parent form using the ``PreloadedExtension`` class::
136
136
{
137
137
protected function getExtensions()
138
138
{
139
- $childType = new TestChildType() ;
139
+ $childType = TestChildType::class ;
140
140
141
141
return array(new PreloadedExtension(array(
142
142
$childType->getName() => $childType,
@@ -145,7 +145,7 @@ before creating the parent form using the ``PreloadedExtension`` class::
145
145
146
146
public function testSubmitValidData()
147
147
{
148
- $type = new TestedType() ;
148
+ $type = TestedType::class ;
149
149
$form = $this->factory->create($type);
150
150
151
151
// ... your test
0 commit comments