public function AllValidatorTest::testWalkMultipleConstraints in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Tests/Constraints/AllValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\AllValidatorTest::testWalkMultipleConstraints()
@dataProvider getValidArguments
File
- vendor/
symfony/ validator/ Tests/ Constraints/ AllValidatorTest.php, line 68
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testWalkMultipleConstraints($array) {
$constraint1 = new Range(array(
'min' => 4,
));
$constraint2 = new NotNull();
$constraints = array(
$constraint1,
$constraint2,
);
$i = 0;
foreach ($array as $key => $value) {
$this
->expectValidateValueAt($i++, '[' . $key . ']', $value, array(
$constraint1,
$constraint2,
));
}
$this->validator
->validate($array, new All($constraints));
$this
->assertNoViolation();
}