@@ -366,16 +366,6 @@ public function testTableAddForeignKey(): void
366366
367367 public function testTableRemoveForeignKey (): void
368368 {
369- $ tableForeign = Table::editor ()
370- ->setUnquotedName ('bar ' )
371- ->setColumns (
372- Column::editor ()
373- ->setUnquotedName ('id ' )
374- ->setTypeName (Types::INTEGER )
375- ->create (),
376- )
377- ->create ();
378-
379369 $ table1 = Table::editor ()
380370 ->setUnquotedName ('foo ' )
381371 ->setColumns (
@@ -396,6 +386,7 @@ public function testTableRemoveForeignKey(): void
396386 )
397387 ->setForeignKeyConstraints (
398388 ForeignKeyConstraint::editor ()
389+ ->setUnquotedName ('fk_bar ' )
399390 ->setUnquotedReferencingColumnNames ('fk ' )
400391 ->setUnquotedReferencedTableName ('bar ' )
401392 ->setUnquotedReferencedColumnNames ('id ' )
@@ -405,7 +396,7 @@ public function testTableRemoveForeignKey(): void
405396
406397 $ tableDiff = $ this ->comparator ->compareTables ($ table2 , $ table1 );
407398
408- self ::assertCount (1 , $ tableDiff ->getDroppedForeignKeys ());
399+ self ::assertCount (1 , $ tableDiff ->getDroppedForeignKeyConstraintNames ());
409400 }
410401
411402 public function testTableUpdateForeignKey (): void
@@ -420,6 +411,7 @@ public function testTableUpdateForeignKey(): void
420411 )
421412 ->setForeignKeyConstraints (
422413 ForeignKeyConstraint::editor ()
414+ ->setUnquotedName ('fk_bar ' )
423415 ->setUnquotedReferencingColumnNames ('fk ' )
424416 ->setUnquotedReferencedTableName ('bar ' )
425417 ->setUnquotedReferencedColumnNames ('id ' )
@@ -447,7 +439,7 @@ public function testTableUpdateForeignKey(): void
447439
448440 $ tableDiff = $ this ->comparator ->compareTables ($ table1 , $ table2 );
449441
450- self ::assertCount (1 , $ tableDiff ->getDroppedForeignKeys ());
442+ self ::assertCount (1 , $ tableDiff ->getDroppedForeignKeyConstraintNames ());
451443 self ::assertCount (1 , $ tableDiff ->getAddedForeignKeys ());
452444 }
453445
@@ -463,6 +455,7 @@ public function testMovedForeignKeyForeignTable(): void
463455 )
464456 ->setForeignKeyConstraints (
465457 ForeignKeyConstraint::editor ()
458+ ->setUnquotedName ('fk_bar ' )
466459 ->setUnquotedReferencingColumnNames ('fk ' )
467460 ->setUnquotedReferencedTableName ('bar ' )
468461 ->setUnquotedReferencedColumnNames ('id ' )
@@ -489,7 +482,7 @@ public function testMovedForeignKeyForeignTable(): void
489482
490483 $ tableDiff = $ this ->comparator ->compareTables ($ table1 , $ table2 );
491484
492- self ::assertCount (1 , $ tableDiff ->getDroppedForeignKeys ());
485+ self ::assertCount (1 , $ tableDiff ->getDroppedForeignKeyConstraintNames ());
493486 self ::assertCount (1 , $ tableDiff ->getAddedForeignKeys ());
494487 }
495488
0 commit comments