Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Feb 9, 2025
1 parent d1eee27 commit b939d33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Common/CommonCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
use Yiisoft\Db\Tests\Support\Assert;
use Yiisoft\Db\Transaction\TransactionInterface;

use function array_filter;
use function is_string;
use function setlocale;
use function str_starts_with;
Expand Down Expand Up @@ -511,10 +512,9 @@ public function testCreateIndex(array $columns, array $indexColumns, string|null

$this->assertCount($count + 1, $schema->getTableIndexes($tableName));

$index = $schema->getTableIndexes($tableName)[$count];
$index = array_filter($schema->getTableIndexes($tableName), static fn ($index) => !$index->isPrimary())[0];

$this->assertSame($indexColumns, $index->getColumnNames());
$this->assertFalse($index->isPrimary());

if ($indexType !== null && str_starts_with($indexType, 'UNIQUE')) {
$this->assertTrue($index->isUnique());
Expand Down

0 comments on commit b939d33

Please sign in to comment.