You are here

public function ConstraintViolationTest::testToStringHandlesArrays in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/ConstraintViolationTest.php, line 18

Class

ConstraintViolationTest

Namespace

Symfony\Component\Validator\Tests

Code

public function testToStringHandlesArrays() {
  $violation = new ConstraintViolation('Array', '{{ value }}', array(
    '{{ value }}' => array(
      1,
      2,
      3,
    ),
  ), 'Root', 'property.path', null);
  $expected = <<<EOF
Root.property.path:
    Array
EOF;
  $this
    ->assertSame($expected, (string) $violation);
}