You are here

public function ConstraintViolationTest::testToStringHandlesArrays in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/ConstraintViolationTest.php \Symfony\Component\Validator\Tests\ConstraintViolationTest::testToStringHandlesArrays()

File

vendor/symfony/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);
}