Skip to content

Commit

Permalink
Don't call the constructor of LogicalOr
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Sep 19, 2024
1 parent 9c483af commit 5b06142
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Test/ConstraintValidatorTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ protected function expectValidateAt(int $i, string $propertyPath, $value, $group
{
$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);
});
Expand Down

0 comments on commit 5b06142

Please sign in to comment.