public function Abstract2Dot5ApiTest::testPassConstraintToViolation in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Validator/ Abstract2Dot5ApiTest.php, line 768
Class
- Abstract2Dot5ApiTest
- Verifies that a validator satisfies the API of Symfony 2.5+.
Namespace
Symfony\Component\Validator\Tests\ValidatorCode
public function testPassConstraintToViolation() {
$constraint = new FailingConstraint();
$violations = $this
->validate('Foobar', $constraint);
$this
->assertCount(1, $violations);
$this
->assertSame($constraint, $violations[0]
->getConstraint());
}