protected function LegacyValidator2Dot5ApiTest::createValidator in Plug 7
Parameters
MetadataFactoryInterface $metadataFactory:
Return value
ValidatorInterface
Overrides Abstract2Dot5ApiTest::createValidator
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Validator/ LegacyValidator2Dot5ApiTest.php, line 34
Class
- LegacyValidator2Dot5ApiTest
- @group legacy
Namespace
Symfony\Component\Validator\Tests\ValidatorCode
protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) {
$contextFactory = new LegacyExecutionContextFactory($metadataFactory, new DefaultTranslator());
$validatorFactory = new ConstraintValidatorFactory();
return new LegacyValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers);
}