File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ allows you to return a list of extensions to register::
178
178
use Symfony\Component\Form\FormBuilder;
179
179
use Symfony\Component\Form\Test\TypeTestCase;
180
180
use Symfony\Component\Validator\ConstraintViolationList;
181
+ use Symfony\Component\Validator\Mapping\ClassMetadata;
181
182
use Symfony\Component\Validator\Validator\ValidatorInterface;
182
183
183
184
class TestedTypeTest extends TypeTestCase
@@ -190,6 +191,9 @@ allows you to return a list of extensions to register::
190
191
$validator
191
192
->method('validate')
192
193
->will($this->returnValue(new ConstraintViolationList()));
194
+ $validator
195
+ ->method('getMetadataFor')
196
+ ->will($this->returnValue(new ClassMetadata('Symfony\Component\Form\Form')));
193
197
194
198
return array(
195
199
new ValidatorExtension($validator),
You can’t perform that action at this time.
0 commit comments