[Validator] Fixed failing tests
This commit is contained in:
parent
3bd6d802ed
commit
295e5bb178
@ -13,10 +13,10 @@ namespace Symfony\Component\Validator\Tests;
|
||||
|
||||
use Symfony\Component\Validator\Constraints\Collection;
|
||||
use Symfony\Component\Validator\Constraints\All;
|
||||
use Symfony\Component\Validator\ConstraintValidatorFactory;
|
||||
use Symfony\Component\Validator\ConstraintViolation;
|
||||
use Symfony\Component\Validator\ConstraintViolationList;
|
||||
use Symfony\Component\Validator\ExecutionContext;
|
||||
use Symfony\Component\Validator\LegacyConstraintValidatorFactory;
|
||||
use Symfony\Component\Validator\Tests\Fixtures\ConstraintA;
|
||||
use Symfony\Component\Validator\ValidationVisitor;
|
||||
|
||||
@ -313,7 +313,7 @@ class ExecutionContextTest extends \PHPUnit_Framework_TestCase
|
||||
'[name]'
|
||||
);
|
||||
|
||||
$visitor = new ValidationVisitor('Root', $this->metadataFactory, new ConstraintValidatorFactory(), $this->translator);
|
||||
$visitor = new ValidationVisitor('Root', $this->metadataFactory, new LegacyConstraintValidatorFactory(), $this->translator);
|
||||
$context = new ExecutionContext($visitor, $this->translator, self::TRANS_DOMAIN);
|
||||
$context->validateValue($data, $constraints);
|
||||
|
||||
|
@ -397,7 +397,7 @@ class ValidatorBuilder implements ValidatorBuilderInterface
|
||||
}
|
||||
|
||||
if (Validation::API_VERSION_2_5 === $apiVersion) {
|
||||
$contextFactory = new ExecutionContextFactory($metadataFactory, $translator, $this->translationDomain);
|
||||
$contextFactory = new ExecutionContextFactory($translator, $this->translationDomain);
|
||||
$validatorFactory = $validatorFactory ?: new ConstraintValidatorFactory($this->propertyAccessor);
|
||||
|
||||
return new RecursiveValidator($contextFactory, $metadataFactory, $validatorFactory, $this->initializers);
|
||||
|
Reference in New Issue
Block a user