diff --git a/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php b/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php index f4de7deccc..a80b77152e 100644 --- a/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php +++ b/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php @@ -115,7 +115,7 @@ abstract class ConstraintValidatorTestCase extends TestCase $validator->expects($this->any()) ->method('inContext') ->with($context) - ->willReturn(new AssertingContextualValidator()); + ->willReturn($this->createMock(AssertingContextualValidator::class)); return $context; }