@@ -433,7 +433,7 @@ public function testListTableIndexes(): void
433
433
434
434
$ tableIndexes = $ this ->schemaManager ->listTableIndexes ('list_table_indexes_test ' );
435
435
436
- self ::assertEquals (3 , count ( $ tableIndexes) );
436
+ self ::assertCount (3 , $ tableIndexes );
437
437
438
438
self ::assertArrayHasKey ('primary ' , $ tableIndexes , 'listTableIndexes() has to return a "primary" array key. ' );
439
439
self ::assertEquals (['id ' , 'other_id ' ], array_map ('strtolower ' , $ tableIndexes ['primary ' ]->getColumns ()));
@@ -513,7 +513,7 @@ public function testCreateTableWithForeignKeys(): void
513
513
514
514
$ fkTable = $ this ->schemaManager ->listTableDetails ('test_create_fk ' );
515
515
$ fkConstraints = $ fkTable ->getForeignKeys ();
516
- self ::assertEquals (1 , count ( $ fkConstraints) , "Table 'test_create_fk1 ' has to have one foreign key. " );
516
+ self ::assertCount (1 , $ fkConstraints , "Table 'test_create_fk ' has to have one foreign key. " );
517
517
518
518
$ fkConstraint = current ($ fkConstraints );
519
519
self ::assertInstanceOf (ForeignKeyConstraint::class, $ fkConstraint );
@@ -545,7 +545,7 @@ public function testListForeignKeys(): void
545
545
546
546
$ fkeys = $ this ->schemaManager ->listTableForeignKeys ('test_create_fk1 ' );
547
547
548
- self ::assertEquals (1 , count ( $ fkeys) , "Table 'test_create_fk1' has to have one foreign key. " );
548
+ self ::assertCount (1 , $ fkeys , "Table 'test_create_fk1' has to have one foreign key. " );
549
549
550
550
self ::assertInstanceOf (ForeignKeyConstraint::class, $ fkeys [0 ]);
551
551
self ::assertEquals (['foreign_key_test ' ], array_map ('strtolower ' , $ fkeys [0 ]->getLocalColumns ()));
@@ -613,8 +613,8 @@ public function testAlterTableScenario(): void
613
613
self ::assertTrue ($ table ->hasColumn ('id ' ));
614
614
self ::assertTrue ($ table ->hasColumn ('test ' ));
615
615
self ::assertTrue ($ table ->hasColumn ('foreign_key_test ' ));
616
- self ::assertEquals (0 , count ( $ table ->getForeignKeys () ));
617
- self ::assertEquals (1 , count ( $ table ->getIndexes () ));
616
+ self ::assertCount (0 , $ table ->getForeignKeys ());
617
+ self ::assertCount (1 , $ table ->getIndexes ());
618
618
619
619
$ tableDiff = new TableDiff ('alter_table ' );
620
620
$ tableDiff ->fromTable = $ alterTable ;
@@ -634,7 +634,7 @@ public function testAlterTableScenario(): void
634
634
$ this ->schemaManager ->alterTable ($ tableDiff );
635
635
636
636
$ table = $ this ->schemaManager ->listTableDetails ('alter_table ' );
637
- self ::assertEquals (2 , count ( $ table ->getIndexes () ));
637
+ self ::assertCount (2 , $ table ->getIndexes ());
638
638
self ::assertTrue ($ table ->hasIndex ('foo_idx ' ));
639
639
self ::assertEquals (['foo ' ], array_map ('strtolower ' , $ table ->getIndex ('foo_idx ' )->getColumns ()));
640
640
self ::assertFalse ($ table ->getIndex ('foo_idx ' )->isPrimary ());
@@ -647,7 +647,7 @@ public function testAlterTableScenario(): void
647
647
$ this ->schemaManager ->alterTable ($ tableDiff );
648
648
649
649
$ table = $ this ->schemaManager ->listTableDetails ('alter_table ' );
650
- self ::assertEquals (2 , count ( $ table ->getIndexes () ));
650
+ self ::assertCount (2 , $ table ->getIndexes ());
651
651
self ::assertTrue ($ table ->hasIndex ('foo_idx ' ));
652
652
self ::assertEquals (
653
653
['foo ' , 'foreign_key_test ' ],
@@ -661,7 +661,7 @@ public function testAlterTableScenario(): void
661
661
$ this ->schemaManager ->alterTable ($ tableDiff );
662
662
663
663
$ table = $ this ->schemaManager ->listTableDetails ('alter_table ' );
664
- self ::assertEquals (2 , count ( $ table ->getIndexes () ));
664
+ self ::assertCount (2 , $ table ->getIndexes ());
665
665
self ::assertTrue ($ table ->hasIndex ('bar_idx ' ));
666
666
self ::assertFalse ($ table ->hasIndex ('foo_idx ' ));
667
667
self ::assertEquals (
@@ -900,7 +900,7 @@ public function testGetColumnComment(): void
900
900
$ this ->schemaManager ->createTable ($ table );
901
901
902
902
$ columns = $ this ->schemaManager ->listTableColumns ('column_comment_test ' );
903
- self ::assertEquals (1 , count ( $ columns) );
903
+ self ::assertCount (1 , $ columns );
904
904
self ::assertEquals ('This is a comment ' , $ columns ['id ' ]->getComment ());
905
905
906
906
$ tableDiff = new TableDiff ('column_comment_test ' );
@@ -922,7 +922,7 @@ public function testGetColumnComment(): void
922
922
$ this ->schemaManager ->alterTable ($ tableDiff );
923
923
924
924
$ columns = $ this ->schemaManager ->listTableColumns ('column_comment_test ' );
925
- self ::assertEquals (1 , count ( $ columns) );
925
+ self ::assertCount (1 , $ columns );
926
926
self ::assertEmpty ($ columns ['id ' ]->getComment ());
927
927
}
928
928
@@ -947,7 +947,7 @@ public function testAutomaticallyAppendCommentOnMarkedColumns(): void
947
947
$ this ->schemaManager ->createTable ($ table );
948
948
949
949
$ columns = $ this ->schemaManager ->listTableColumns ('column_comment_test2 ' );
950
- self ::assertEquals (3 , count ( $ columns) );
950
+ self ::assertCount (3 , $ columns );
951
951
self ::assertEquals ('This is a comment ' , $ columns ['id ' ]->getComment ());
952
952
self ::assertEquals ('This is a comment ' , $ columns ['obj ' ]->getComment ());
953
953
self ::assertInstanceOf (ObjectType::class, $ columns ['obj ' ]->getType ());
@@ -975,7 +975,7 @@ public function testCommentHintOnDateIntervalTypeColumn(): void
975
975
$ this ->schemaManager ->createTable ($ table );
976
976
977
977
$ columns = $ this ->schemaManager ->listTableColumns ('column_dateinterval_comment ' );
978
- self ::assertEquals (2 , count ( $ columns) );
978
+ self ::assertCount (2 , $ columns );
979
979
self ::assertEquals ('This is a comment ' , $ columns ['id ' ]->getComment ());
980
980
self ::assertEquals ('This is a comment ' , $ columns ['date_interval ' ]->getComment ());
981
981
self ::assertInstanceOf (DateIntervalType::class, $ columns ['date_interval ' ]->getType ());
@@ -1110,7 +1110,7 @@ public function testListForeignKeysComposite(): void
1110
1110
1111
1111
$ fkeys = $ this ->schemaManager ->listTableForeignKeys ('test_create_fk3 ' );
1112
1112
1113
- self ::assertEquals (1 , count ( $ fkeys) , "Table 'test_create_fk3' has to have one foreign key. " );
1113
+ self ::assertCount (1 , $ fkeys , "Table 'test_create_fk3' has to have one foreign key. " );
1114
1114
1115
1115
self ::assertInstanceOf (ForeignKeyConstraint::class, $ fkeys [0 ]);
1116
1116
self ::assertEquals (['id ' , 'foreign_key_test ' ], array_map ('strtolower ' , $ fkeys [0 ]->getLocalColumns ()));
0 commit comments