You are here

protected function RecursiveValidator2Dot5ApiTest::createValidator in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php \Symfony\Component\Validator\Tests\Validator\RecursiveValidator2Dot5ApiTest::createValidator()

Parameters

MetadataFactoryInterface $metadataFactory:

Return value

ValidatorInterface

Overrides Abstract2Dot5ApiTest::createValidator

File

vendor/symfony/validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php, line 23

Class

RecursiveValidator2Dot5ApiTest

Namespace

Symfony\Component\Validator\Tests\Validator

Code

protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) {
  $translator = new IdentityTranslator();
  $translator
    ->setLocale('en');
  $contextFactory = new ExecutionContextFactory($translator);
  $validatorFactory = new ConstraintValidatorFactory();
  return new RecursiveValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers);
}