From 5a6558b7fa21f337eb32825cf170f3406e3a79c6 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 26 Aug 2019 11:20:32 +0200 Subject: [PATCH 1/2] fix merge --- .../Component/Validator/Tests/ConstraintViolationTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php b/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php index e3b57016ea..621e5ce819 100644 --- a/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php +++ b/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php @@ -13,6 +13,8 @@ namespace Symfony\Component\Validator\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\Tests\Fixtures\CustomArrayObject; +use Symfony\Component\Validator\Tests\Fixtures\ToString; class ConstraintViolationTest extends TestCase { From 97832ec5cd2aba60f8487a50c7b17b7000b1ad7e Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 26 Aug 2019 11:28:48 +0200 Subject: [PATCH 2/2] fix merge --- .../Tests/ConstraintViolationTest.php | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php b/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php index 621e5ce819..698d95d913 100644 --- a/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php +++ b/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php @@ -111,26 +111,6 @@ EOF; $this->assertSame($expected, (string) $violation); } - public function testMessageCanBeStringableObject() - { - $message = new ToString(); - $violation = new ConstraintViolation( - $message, - (string) $message, - [], - 'Root', - 'property.path', - null - ); - - $expected = <<<'EOF' -Root.property.path: - toString -EOF; - $this->assertSame($expected, (string) $violation); - $this->assertSame((string) $message, $violation->getMessage()); - } - public function testMessageCannotBeArray() { $this->expectException(\TypeError::class);