protected function AbstractConstraintValidatorTest::assertViolations in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest::assertViolations()
Parameters
array $expected:
Deprecated
To be removed in Symfony 3.0. Use {@link buildViolation()} instead.
File
- vendor/
symfony/ validator/ Tests/ Constraints/ AbstractConstraintValidatorTest.php, line 276
Class
- AbstractConstraintValidatorTest
- @since 2.5.3
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
protected function assertViolations(array $expected) {
@trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.3 and will be removed in 3.0. Use the buildViolation() method instead.', E_USER_DEPRECATED);
$violations = $this->context
->getViolations();
$this
->assertCount(count($expected), $violations);
$i = 0;
foreach ($expected as $violation) {
$this
->assertEquals($violation, $violations[$i++]);
}
}