From 829f2b9bc7290c0b1b1a9db373ee26199c9bcc4d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 1 Jul 2024 16:59:47 +0200 Subject: fix(db): Promote the use of `getDatabaseProvider` to reduce the impage of removed upstream platforms Signed-off-by: Joas Schilling --- tests/lib/Files/Cache/CacheTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/lib/Files/Cache/CacheTest.php') diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php index faecbf54491..a36607eb965 100644 --- a/tests/lib/Files/Cache/CacheTest.php +++ b/tests/lib/Files/Cache/CacheTest.php @@ -7,12 +7,12 @@ namespace Test\Files\Cache; -use Doctrine\DBAL\Platforms\MySqlPlatform; use OC\Files\Cache\Cache; use OC\Files\Search\SearchComparison; use OC\Files\Search\SearchQuery; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Search\ISearchComparison; +use OCP\IDBConnection; use OCP\IUser; class LongId extends \OC\Files\Storage\Temporary { @@ -142,7 +142,7 @@ class CacheTest extends \Test\TestCase { if (strpos($folder, 'F09F9890')) { // 4 byte UTF doesn't work on mysql $params = \OC::$server->get(\OC\DB\Connection::class)->getParams(); - if (\OC::$server->getDatabaseConnection()->getDatabasePlatform() instanceof MySqlPlatform && $params['charset'] !== 'utf8mb4') { + if (\OC::$server->getDatabaseConnection()->getDatabaseProvider() === IDBConnection::PLATFORM_MYSQL && $params['charset'] !== 'utf8mb4') { $this->markTestSkipped('MySQL doesn\'t support 4 byte UTF-8'); } } -- cgit v1.2.3