diff --git a/tests/AbstractQueryBuilderTest.php b/tests/AbstractQueryBuilderTest.php index 0f1263cf0..3c929995c 100644 --- a/tests/AbstractQueryBuilderTest.php +++ b/tests/AbstractQueryBuilderTest.php @@ -187,19 +187,18 @@ public function testAddUnique(string $name, string $table, array|string $columns $this->assertSame($expected, $sql); } - /** @dataProvider \Yiisoft\Db\Tests\Provider\QueryBuilderProvider::columnTypes */ - public function testAlterColumn(ColumnInterface|string $type): void + public function testAlterColumn(): void { $db = $this->getConnection(); $qb = $db->getQueryBuilder(); - $sql = $qb->alterColumn('customer', 'email', $type); + $sql = $qb->alterColumn('customer', 'email', SchemaInterface::TYPE_STRING); $this->assertSame( DbHelper::replaceQuotes( <<getColumnType($type), + SQL . ' ' . $qb->getColumnType(SchemaInterface::TYPE_STRING), $db->getDriverName(), ), $sql, diff --git a/tests/Db/Command/CommandTest.php b/tests/Db/Command/CommandTest.php index bbe23a985..21aa4205c 100644 --- a/tests/Db/Command/CommandTest.php +++ b/tests/Db/Command/CommandTest.php @@ -158,20 +158,17 @@ public function testAddUniqueSql(string $name, string $tableName, array|string $ $this->assertSame($expected, $sql); } - /** @dataProvider \Yiisoft\Db\Tests\Provider\CommandProvider::columnTypes */ - public function testAlterColumn(ColumnInterface|string $type): void + public function testAlterColumn(): void { $db = $this->getConnection(); $command = $db->createCommand(); - $sql = $command->alterColumn('table', 'column', $type)->getSql(); - - $type = $db->getQueryBuilder()->getColumnType($type); + $sql = $command->alterColumn('table', 'column', SchemaInterface::TYPE_INTEGER)->getSql(); $this->assertSame( DbHelper::replaceQuotes( <<getDriverName(), ),