File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 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::
178178 use Symfony\Component\Form\FormBuilder;
179179 use Symfony\Component\Form\Test\TypeTestCase;
180180 use Symfony\Component\Validator\ConstraintViolationList;
181+ use Symfony\Component\Validator\Mapping\ClassMetadata;
181182 use Symfony\Component\Validator\Validator\ValidatorInterface;
182183
183184 class TestedTypeTest extends TypeTestCase
@@ -190,6 +191,9 @@ allows you to return a list of extensions to register::
190191 $validator
191192 ->method('validate')
192193 ->will($this->returnValue(new ConstraintViolationList()));
194+ $validator
195+ ->method('getMetadataFor')
196+ ->will($this->returnValue(new ClassMetadata('Symfony\Component\Form\Form')));
193197
194198 return array(
195199 new ValidatorExtension($validator),
You can’t perform that action at this time.
0 commit comments