From 701eea4b7fc00eed3df8c06e833729dde159ae97 Mon Sep 17 00:00:00 2001 From: Daniele Pedone Date: Wed, 24 Jan 2024 15:57:05 +0100 Subject: [PATCH] Replaced LogicalOr instantiation into ConstraintValidatorTestCase.php Replaced LogicalOr instantiation since the BinaryOperator has a protected constructor. --- Test/ConstraintValidatorTestCase.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Test/ConstraintValidatorTestCase.php b/Test/ConstraintValidatorTestCase.php index f808e49ba..6584edf4d 100644 --- a/Test/ConstraintValidatorTestCase.php +++ b/Test/ConstraintValidatorTestCase.php @@ -220,8 +220,7 @@ protected function expectValidateAt(int $i, string $propertyPath, mixed $value, { $validator = $this->context->getValidator()->inContext($this->context); $validator->expectValidation($i, $propertyPath, $value, $group, function ($passedConstraints) { - $expectedConstraints = new LogicalOr(); - $expectedConstraints->setConstraints([new IsNull(), new IsIdentical([]), new IsInstanceOf(Valid::class)]); + $expectedConstraints = LogicalOr::fromConstraints(new IsNull(), new IsIdentical([]), new IsInstanceOf(Valid::class)); Assert::assertThat($passedConstraints, $expectedConstraints); });