8000 Experimental commit · symfony/symfony@6da07dc · GitHub
[go: up one dir, main page]

Skip to content

Commit 6da07dc

Browse files
Experimental commit
1 parent b27eaf0 commit 6da07dc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,24 @@ public function testWalkSingleConstraint($array)
5555
$this->assertNoViolation();
5656
}
5757

58+
/**
59+
* @dataProvider getValidArguments
60+
*/
61+
public function testWalkSingleConstraintThatShouldHaveViolations($array)
62+
{
63+
$constraint = new Range(['min' => 14]);
64+
65+
$i = 0;
66+
67+
foreach ($array as $key => $value) {
68+
$this->expectValidateValueAt($i++, '['.$key.']', $value, [$constraint]);
69+
}
70+
71+
$this->validator->validate($array, new All($constraint));
72+
73+
$this->assertNoViolation();
74+
}
75+
5876
/**
5977
* @dataProvider getValidArguments
6078
*/

0 commit comments

Comments
 (0)
0