class ConstraintViolationTest

Hierarchy

  • class \Symfony\Component\Validator\Tests\ConstraintViolationTest extends \Symfony\Component\Validator\Tests\PHPUnit_Framework_TestCase

Expanded class hierarchy of ConstraintViolationTest

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/ConstraintViolationTest.php, line 16

Namespace

Symfony\Component\Validator\Tests
View source
class ConstraintViolationTest extends \PHPUnit_Framework_TestCase {
  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);
  }

}

Members