From 50a3bd1dc44e517f3c45cd8a980ceac5ecefa6f3 Mon Sep 17 00:00:00 2001 From: berkut1 Date: Thu, 6 Jun 2024 03:01:48 +0300 Subject: [PATCH] add test --- tests/Platforms/AbstractPlatformTestCase.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/Platforms/AbstractPlatformTestCase.php b/tests/Platforms/AbstractPlatformTestCase.php index feabb6eb384..da4d8c886cb 100644 --- a/tests/Platforms/AbstractPlatformTestCase.php +++ b/tests/Platforms/AbstractPlatformTestCase.php @@ -1445,6 +1445,18 @@ public function testEmptySchemaDiff(): void self::assertSame([], $this->platform->getAlterSchemaSQL($diff)); } + public function testColumnComparisonWithDisabledTypeComments(): void + { + //Since DATETIME_MUTABLE is a "parent" of DATETIME_IMMUTABLE, they will have the same SQL type declaration. + $column1 = new Column('foo', Type::getType(Types::DATETIME_MUTABLE)); + $column2 = new Column('foo', Type::getType(Types::DATETIME_IMMUTABLE)); + + $this->platform->setDisableTypeComments(true); + $result = (new Comparator($this->platform))->columnsEqual($column1, $column2); + + self::assertTrue($result); + } + public function tearDown(): void { if (! isset($this->backedUpType)) {