77use PhpMyAdmin \SqlParser \Parser ;
88use PhpMyAdmin \SqlParser \Statements \CreateStatement ;
99use PhpMyAdmin \SqlParser \Tests \TestCase ;
10- use PhpMyAdmin \SqlParser \Utils \ForeignKeyData ;
10+ use PhpMyAdmin \SqlParser \Utils \ForeignKey ;
1111use PhpMyAdmin \SqlParser \Utils \Table ;
1212use PHPUnit \Framework \Attributes \DataProvider ;
1313
1414class TableTest extends TestCase
1515{
16- /** @param list<ForeignKeyData > $expected */
16+ /** @param list<ForeignKey > $expected */
1717 #[DataProvider('getForeignKeysProvider ' )]
1818 public function testGetForeignKeys (string $ query , array $ expected ): void
1919 {
@@ -24,7 +24,7 @@ public function testGetForeignKeys(string $query, array $expected): void
2424 $ this ->assertEquals ($ expected , $ result );
2525 }
2626
27- /** @return list<array{string, list<ForeignKeyData >}> */
27+ /** @return list<array{string, list<ForeignKey >}> */
2828 public static function getForeignKeysProvider (): array
2929 {
3030 return [
@@ -53,22 +53,22 @@ public static function getForeignKeysProvider(): array
5353 REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE
5454 ) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 ' ,
5555 [
56- new ForeignKeyData (
56+ new ForeignKey (
5757 constraint: 'fk_payment_customer ' ,
5858 indexList: ['customer_id ' ],
5959 refTableName: 'customer ' ,
6060 refIndexList: ['customer_id ' ],
6161 onUpdate: 'CASCADE ' ,
6262 ),
63- new ForeignKeyData (
63+ new ForeignKey (
6464 constraint: 'fk_payment_rental ' ,
6565 indexList: ['rental_id ' ],
6666 refTableName: 'rental ' ,
6767 refIndexList: ['rental_id ' ],
6868 onDelete: 'SET_NULL ' ,
6969 onUpdate: 'CASCADE ' ,
7070 ),
71- new ForeignKeyData (
71+ new ForeignKey (
7272 constraint: 'fk_payment_staff ' ,
7373 indexList: ['staff_id ' ],
7474 refTableName: 'staff ' ,
@@ -103,7 +103,7 @@ public static function getForeignKeysProvider(): array
103103 CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE
104104 ) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8 ' ,
105105 [
106- new ForeignKeyData (
106+ new ForeignKey (
107107 constraint: 'fk_address_city ' ,
108108 indexList: ['city_id ' ],
109109 refTableName: 'city ' ,
0 commit comments