@@ -31,10 +31,9 @@ public function getAllNonUTF8BinTables(IDBConnection $connection) {
3131/**
3232 * Tests for the converting of MySQL tables to InnoDB engine
3333 *
34- * @group DB
35- *
3634 * @see \OC\Repair\RepairMimeTypes
3735 */
36+ #[\PHPUnit \Framework \Attributes \Group('DB ' )]
3837class RepairCollationTest extends TestCase {
3938
4039 private TestCollationRepair $ repair ;
@@ -48,13 +47,12 @@ protected function setUp(): void {
4847 parent ::setUp ();
4948
5049 $ this ->connection = Server::get (ConnectionAdapter::class);
51- $ this ->config = Server::get (IConfig::class);
5250 if ($ this ->connection ->getDatabaseProvider () !== IDBConnection::PLATFORM_MYSQL ) {
5351 $ this ->markTestSkipped ('Test only relevant on MySql ' );
5452 }
5553
5654 $ this ->logger = $ this ->createMock (LoggerInterface::class);
57-
55+ $ this -> config = Server:: get (IConfig::class);
5856 $ dbPrefix = $ this ->config ->getSystemValueString ('dbtableprefix ' );
5957 $ this ->tableName = $ this ->getUniqueID ($ dbPrefix . '_collation_test ' );
6058 $ this ->connection ->prepare ("CREATE TABLE $ this ->tableName (text VARCHAR(16)) COLLATE utf8_unicode_ci " )->execute ();
@@ -63,7 +61,11 @@ protected function setUp(): void {
6361 }
6462
6563 protected function tearDown (): void {
66- $ this ->connection ->getInner ()->createSchemaManager ()->dropTable ($ this ->tableName );
64+ $ this ->connection = Server::get (ConnectionAdapter::class);
65+ if ($ this ->connection ->getDatabaseProvider () === IDBConnection::PLATFORM_MYSQL ) {
66+ // tear down only needed on MySQL
67+ $ this ->connection ->getInner ()->createSchemaManager ()->dropTable ($ this ->tableName );
68+ }
6769 parent ::tearDown ();
6870 }
6971
0 commit comments