@@ -79,13 +79,6 @@ protected function tearDown(): void
7979 unset($ this ->adapter , $ this ->out , $ this ->io );
8080 }
8181
82- private function getDefaultCollation (): string
83- {
84- return $ this ->usingMariaDbWithUuid () ?
85- 'utf8mb4_general_ci ' :
86- 'utf8mb4_0900_ai_ci ' ;
87- }
88-
8982 private function usingMysql8 (): bool
9083 {
9184 $ version = $ this ->adapter ->getConnection ()->getDriver ()->version ();
@@ -461,7 +454,7 @@ public function testCreateTableAndInheritDefaultCollation()
461454 ->save ();
462455 $ this ->assertTrue ($ adapter ->hasTable ('table_with_default_collation ' ));
463456 $ row = $ adapter ->fetchRow (sprintf ("SHOW TABLE STATUS WHERE Name = '%s' " , 'table_with_default_collation ' ));
464- $ this ->assertContains ($ row ['Collation ' ], ['utf8mb4_general_ci ' , 'utf8mb4_0900_ai_ci ' , 'utf8mb4_unicode_ci ' ]);
457+ $ this ->assertContains ($ row ['Collation ' ], ['utf8mb4_general_ci ' , 'utf8mb4_0900_ai_ci ' , 'utf8mb4_uca1400_ai_ci ' , ' utf8mb4_unicode_ci ' ]);
465458 }
466459
467460 public function testCreateTableWithLatin1Collate ()
@@ -2288,8 +2281,9 @@ public function testDumpCreateTable()
22882281
22892282 $ actualOutput = join ("\n" , $ this ->out ->messages ());
22902283 // MySQL version affects default collation (8.0.0+ uses utf8mb4_0900_ai_ci, older uses utf8mb4_general_ci)
2284+ // MariaDB 11.8 uses: utf8mb4_uca1400_ai_ci
22912285 $ this ->assertMatchesRegularExpression (
2292- '/CREATE TABLE `table1` \(`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `column1` VARCHAR\(255\) NOT NULL, `column2` INTEGER, `column3` VARCHAR\(255\) NOT NULL DEFAULT \'test \', PRIMARY KEY \(`id`\)\) ENGINE = InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_(0900_ai_ci|general_ci);/ ' ,
2286+ '/CREATE TABLE `table1` \(`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `column1` VARCHAR\(255\) NOT NULL, `column2` INTEGER, `column3` VARCHAR\(255\) NOT NULL DEFAULT \'test \', PRIMARY KEY \(`id`\)\) ENGINE = InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_(0900_ai_ci|uca1400_ai_ci| general_ci);/ ' ,
22932287 $ actualOutput ,
22942288 'Passing the --dry-run option does not dump create table query to the output ' ,
22952289 );
@@ -2398,7 +2392,7 @@ public function testDumpCreateTableAndThenInsert()
23982392 $ actualOutput = preg_replace ('~\R~u ' , '' , $ actualOutput );
23992393 // MySQL version affects default collation (8.0.0+ uses utf8mb4_0900_ai_ci, older uses utf8mb4_general_ci)
24002394 $ this ->assertMatchesRegularExpression (
2401- '/CREATE TABLE `table1` \(`column1` VARCHAR\(255\) NOT NULL, `column2` INTEGER, PRIMARY KEY \(`column1`\)\) ENGINE = InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_(0900_ai_ci|general_ci);INSERT INTO `table1` \(`column1`, `column2`\) VALUES \( \'id1 \', 1\);/ ' ,
2395+ '/CREATE TABLE `table1` \(`column1` VARCHAR\(255\) NOT NULL, `column2` INTEGER, PRIMARY KEY \(`column1`\)\) ENGINE = InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_(0900_ai_ci|uca1400_ai_ci| general_ci);INSERT INTO `table1` \(`column1`, `column2`\) VALUES \( \'id1 \', 1\);/ ' ,
24022396 $ actualOutput ,
24032397 'Passing the --dry-run option does not dump create and then insert table queries to the output ' ,
24042398 );
0 commit comments