function ConstraintValidatorTestCase::expectValidateAt
File
-
vendor/
symfony/ validator/ Test/ ConstraintValidatorTestCase.php, line 223
Class
- ConstraintValidatorTestCase
- A test case to ease testing Constraint Validators.
Namespace
Symfony\Component\Validator\TestCode
protected function expectValidateAt(int $i, string $propertyPath, mixed $value, string|GroupSequence|array|null $group) {
$validator = $this->context
->getValidator()
->inContext($this->context);
$validator->expectValidation($i, $propertyPath, $value, $group, function ($passedConstraints) {
$expectedConstraints = LogicalOr::fromConstraints(new IsNull(), new IsIdentical([]), new IsInstanceOf(Valid::class));
Assert::assertThat($passedConstraints, $expectedConstraints);
});
}