Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed May 28, 2024
1 parent 9d471d3 commit 411e022
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/Functional/Schema/SchemaManagerFunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,26 @@ public function testListTableColumns(): void
self::assertIsArray($columns['baz3']->getPlatformOptions());
}

public function testListTableColumnsWithBigintColumns(): void
{
$tableName = 'test_list_table_bigint';

$table = new Table($tableName);
$table->addColumn('id_with_ai', Types::BIGINT);
$table->setPrimaryKey(['id_with_ai']);
$table->addColumn('foo', Types::BIGINT);

$this->schemaManager->createTable($table);

$columns = $this->schemaManager->listTableColumns($tableName);

self::assertCount(2, $columns);
self::assertArrayHasKey('id_with_ai', $columns);
self::assertInstanceOf(BigIntType::class, $columns['id_with_ai']->getType());
self::assertArrayHasKey('foo', $columns);
self::assertInstanceOf(BigIntType::class, $columns['foo']->getType());
}

public function testListTableColumnsWithFixedStringColumn(): void
{
$tableName = 'test_list_table_fixed_string';
Expand Down

0 comments on commit 411e022

Please sign in to comment.