From 27fa390eed23cb137b41a6cddd4a9b9d6566a6c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 12 Jul 2022 20:02:46 +0200 Subject: [PATCH] Skip test for ArrayType and ObjectType with DBAL 4 --- tests/Doctrine/Tests/ORM/Functional/TypeTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/Functional/TypeTest.php b/tests/Doctrine/Tests/ORM/Functional/TypeTest.php index 18877e8cec1..65fe12783c3 100644 --- a/tests/Doctrine/Tests/ORM/Functional/TypeTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/TypeTest.php @@ -6,6 +6,8 @@ use DateTime; use DateTimeZone; +use Doctrine\DBAL\Types\ArrayType; +use Doctrine\DBAL\Types\ObjectType; use Doctrine\DBAL\Types\Types; use Doctrine\Tests\Models\Generic\BooleanModel; use Doctrine\Tests\Models\Generic\DateTimeModel; @@ -70,6 +72,9 @@ public function testBoolean(): void public function testArray(): void { + if (! class_exists(ArrayType::class)) { + self::markTestSkipped('Test valid for doctrine/dbal:3.x only.'); + } $serialize = new SerializationModel(); $serialize->array['foo'] = 'bar'; $serialize->array['bar'] = 'baz'; @@ -88,6 +93,9 @@ public function testArray(): void public function testObject(): void { + if (! class_exists(ObjectType::class)) { + self::markTestSkipped('Test valid for doctrine/dbal:3.x only.'); + } $serialize = new SerializationModel(); $serialize->object = new stdClass();