File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 6
6
use Doctrine \DBAL \Platforms \MySqlPlatform ;
7
7
use Doctrine \DBAL \Schema \Comparator ;
8
8
use Doctrine \DBAL \Tests \FunctionalTestCase ;
9
+ use function count ;
9
10
10
11
final class NewPrimaryKeyWithNewAutoIncrementColumnTest extends FunctionalTestCase
11
12
{
@@ -60,7 +61,8 @@ public function testAlterPrimaryKeyToAutoIncrementColumn() : void
60
61
self ::assertTrue ($ validationTable ->hasColumn ('new_id ' ));
61
62
self ::assertTrue ($ validationTable ->getColumn ('new_id ' )->getAutoincrement ());
62
63
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 ());
64
66
}
65
67
66
68
private function getPlatform () : AbstractPlatform
Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ public function testSwitchPrimaryKeyColumns() : void
46
46
$ primaryKey = $ table ->getPrimaryKeyColumns ();
47
47
48
48
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 );
51
51
}
52
52
53
53
public function testDiffTableBug () : void
You can’t perform that action at this time.
0 commit comments