Skip to content

Commit 301d678

Browse files
tests fixes
1 parent 25b9092 commit 301d678

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/Functional/Platform/NewPrimaryKeyWithNewAutoIncrementColumnTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Doctrine\DBAL\Platforms\MySqlPlatform;
77
use Doctrine\DBAL\Schema\Comparator;
88
use Doctrine\DBAL\Tests\FunctionalTestCase;
9+
use function count;
910

1011
final class NewPrimaryKeyWithNewAutoIncrementColumnTest extends FunctionalTestCase
1112
{
@@ -60,7 +61,8 @@ public function testAlterPrimaryKeyToAutoIncrementColumn() : void
6061
self::assertTrue($validationTable->hasColumn('new_id'));
6162
self::assertTrue($validationTable->getColumn('new_id')->getAutoincrement());
6263
self::assertTrue($validationTable->hasPrimaryKey());
63-
self::assertSame(['new_id'], $validationTable->getPrimaryKeyColumns());
64+
self::assertEquals(1, count($validationTable->getPrimaryKeyColumns()));
65+
self::assertArrayHasKey('new_id', $validationTable->getPrimaryKeyColumns());
6466
}
6567

6668
private function getPlatform() : AbstractPlatform

tests/Functional/Schema/MySqlSchemaManagerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public function testSwitchPrimaryKeyColumns() : void
4646
$primaryKey = $table->getPrimaryKeyColumns();
4747

4848
self::assertCount(2, $primaryKey);
49-
self::assertContains('bar_id', $primaryKey);
50-
self::assertContains('foo_id', $primaryKey);
49+
self::assertArrayHasKey('bar_id', $primaryKey);
50+
self::assertArrayHasKey('foo_id', $primaryKey);
5151
}
5252

5353
public function testDiffTableBug() : void

0 commit comments

Comments
 (0)