public function ConstraintViolationTest::testToStringHandlesArrayRoots in Plug 7
File
- lib/Symfony/validator/Symfony/Component/Validator/Tests/ConstraintViolationTest.php, line 37
Class
- ConstraintViolationTest
Namespace
Symfony\Component\Validator\Tests
Code
public function testToStringHandlesArrayRoots() {
$violation = new ConstraintViolation('42 cannot be used here', 'this is the message template', array(), array(
'some_value' => 42,
), 'some_value', null);
$expected = <<<EOF
Array.some_value:
42 cannot be used here
EOF;
$this
->assertSame($expected, (string) $violation);
}