Skip to content

Commit 79ad314

Browse files
committed
[#7941] use class constant
1 parent ab67584 commit 79ad314

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

form/unit_testing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ allows you to return a list of extensions to register::
174174

175175
use AppBundle\Form\Type\TestedType;
176176
use Symfony\Component\Form\Extension\Validator\ValidatorExtension;
177+
use Symfony\Component\Form\Form;
177178
use Symfony\Component\Form\Forms;
178179
use Symfony\Component\Form\FormBuilder;
179180
use Symfony\Component\Form\Test\TypeTestCase;
@@ -193,7 +194,7 @@ allows you to return a list of extensions to register::
193194
->will($this->returnValue(new ConstraintViolationList()));
194195
$validator
195196
->method('getMetadataFor')
196-
->will($this->returnValue(new ClassMetadata('Symfony\Component\Form\Form')));
197+
->will($this->returnValue(new ClassMetadata(Form::class)));
197198

198199
return array(
199200
new ValidatorExtension($validator),

0 commit comments

Comments
 (0)