File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ public function getAllNonUTF8BinTables(IDBConnection $connection) {
3131/**
3232 * Tests for the converting of MySQL tables to InnoDB engine
3333 *
34- *
3534 * @see \OC\Repair\RepairMimeTypes
3635 */
3736#[\PHPUnit \Framework \Attributes \Group('DB ' )]
@@ -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
You can’t perform that action at this time.
0 commit comments