Skip to content

Commit

Permalink
tests fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermeblanco committed Apr 30, 2020
1 parent 25b9092 commit 301d678
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Tests\FunctionalTestCase;
use function count;

final class NewPrimaryKeyWithNewAutoIncrementColumnTest extends FunctionalTestCase
{
Expand Down Expand Up @@ -60,7 +61,8 @@ public function testAlterPrimaryKeyToAutoIncrementColumn() : void
self::assertTrue($validationTable->hasColumn('new_id'));
self::assertTrue($validationTable->getColumn('new_id')->getAutoincrement());
self::assertTrue($validationTable->hasPrimaryKey());
self::assertSame(['new_id'], $validationTable->getPrimaryKeyColumns());
self::assertEquals(1, count($validationTable->getPrimaryKeyColumns()));
self::assertArrayHasKey('new_id', $validationTable->getPrimaryKeyColumns());
}

private function getPlatform() : AbstractPlatform
Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/Schema/MySqlSchemaManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public function testSwitchPrimaryKeyColumns() : void
$primaryKey = $table->getPrimaryKeyColumns();

self::assertCount(2, $primaryKey);
self::assertContains('bar_id', $primaryKey);
self::assertContains('foo_id', $primaryKey);
self::assertArrayHasKey('bar_id', $primaryKey);
self::assertArrayHasKey('foo_id', $primaryKey);
}

public function testDiffTableBug() : void
Expand Down

0 comments on commit 301d678

Please sign in to comment.