diff options
Diffstat (limited to 'tests/lib/DB/AdapterTest.php')
-rw-r--r-- | tests/lib/DB/AdapterTest.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/lib/DB/AdapterTest.php b/tests/lib/DB/AdapterTest.php index 99b7cf4e099..394428337f1 100644 --- a/tests/lib/DB/AdapterTest.php +++ b/tests/lib/DB/AdapterTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -6,6 +7,8 @@ namespace Test\DB; +use OCP\IDBConnection; +use OCP\Server; use Test\TestCase; class AdapterTest extends TestCase { @@ -13,8 +16,8 @@ class AdapterTest extends TestCase { private $connection; public function setUp(): void { - $this->connection = \OC::$server->getDatabaseConnection(); - $this->appId = uniqid('test_db_adapter', true); + $this->connection = Server::get(IDBConnection::class); + $this->appId = substr(uniqid('test_db_adapter', true), 0, 32); } public function tearDown(): void { |