db backup prior to drupal security update
[yaffs-website] / vendor / symfony / validator / Tests / Validator / LegacyValidatorLegacyApiTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Validator\Tests\Validator;
13
14 use Symfony\Component\Translation\IdentityTranslator;
15 use Symfony\Component\Validator\ConstraintValidatorFactory;
16 use Symfony\Component\Validator\Context\LegacyExecutionContextFactory;
17 use Symfony\Component\Validator\MetadataFactoryInterface;
18 use Symfony\Component\Validator\Validator\LegacyValidator;
19
20 /**
21  * @group legacy
22  */
23 class LegacyValidatorLegacyApiTest extends AbstractLegacyApiTest
24 {
25     protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array())
26     {
27         $translator = new IdentityTranslator();
28         $translator->setLocale('en');
29
30         $contextFactory = new LegacyExecutionContextFactory($metadataFactory, $translator);
31         $validatorFactory = new ConstraintValidatorFactory();
32
33         return new LegacyValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers);
34     }
35 }