You are here

protected function LegacyValidatorTest::createValidator in Zircon Profile 8

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

Parameters

MetadataFactoryInterface $metadataFactory:

Return value

LegacyValidatorInterface

Overrides AbstractLegacyApiTest::createValidator

File

vendor/symfony/validator/Tests/LegacyValidatorTest.php, line 27

Class

LegacyValidatorTest
@group legacy

Namespace

Symfony\Component\Validator\Tests

Code

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