You are here

LegacyValidatorLegacyApiTest.php in Zircon Profile 8

File

vendor/symfony/validator/Tests/Validator/LegacyValidatorLegacyApiTest.php
View source
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace Symfony\Component\Validator\Tests\Validator;

use Symfony\Component\Translation\IdentityTranslator;
use Symfony\Component\Validator\ConstraintValidatorFactory;
use Symfony\Component\Validator\Context\LegacyExecutionContextFactory;
use Symfony\Component\Validator\MetadataFactoryInterface;
use Symfony\Component\Validator\Validator\LegacyValidator;

/**
 * @group legacy
 */
class LegacyValidatorLegacyApiTest extends AbstractLegacyApiTest {
  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);
  }

}

Classes

Namesort descending Description
LegacyValidatorLegacyApiTest @group legacy