Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
berkut1 committed Jun 6, 2024
1 parent 5b588f8 commit 50a3bd1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Platforms/AbstractPlatformTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 50a3bd1

Please sign in to comment.