protected function LegacyValidator2Dot5ApiTest::createValidator in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php \Symfony\Component\Validator\Tests\Validator\LegacyValidator2Dot5ApiTest::createValidator()
Parameters
MetadataFactoryInterface $metadataFactory:
Return value
ValidatorInterface
Overrides Abstract2Dot5ApiTest::createValidator
File
- vendor/
symfony/ validator/ Tests/ Validator/ LegacyValidator2Dot5ApiTest.php, line 25
Class
- LegacyValidator2Dot5ApiTest
- @group legacy
Namespace
Symfony\Component\Validator\Tests\ValidatorCode
protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) {
$translator = new IdentityTranslator();
$translator
->setLocale('en');
$contextFactory = new LegacyExecutionContextFactory($metadataFactory, $translator);
$validatorFactory = new ConstraintValidatorFactory();
return new LegacyValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers);
}