You are here

public function ConstraintViolationTest::testToStringHandlesArrayRoots 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::testToStringHandlesArrayRoots()

File

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