aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AllConfigTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/AllConfigTest.php')
-rw-r--r--tests/lib/AllConfigTest.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/lib/AllConfigTest.php b/tests/lib/AllConfigTest.php
index b4137c07ac5..ba48a078713 100644
--- a/tests/lib/AllConfigTest.php
+++ b/tests/lib/AllConfigTest.php
@@ -14,9 +14,11 @@ namespace Test;
*
* @package Test
*/
-
+use OC\AllConfig;
use OC\SystemConfig;
use OCP\IDBConnection;
+use OCP\PreConditionNotMetException;
+use OCP\Server;
class AllConfigTest extends \Test\TestCase {
/** @var \OCP\IDBConnection */
@@ -24,7 +26,7 @@ class AllConfigTest extends \Test\TestCase {
protected function getConfig($systemConfig = null, $connection = null) {
if ($this->connection === null) {
- $this->connection = \OC::$server->getDatabaseConnection();
+ $this->connection = Server::get(IDBConnection::class);
}
if ($connection === null) {
$connection = $this->connection;
@@ -34,7 +36,7 @@ class AllConfigTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
}
- return new \OC\AllConfig($systemConfig, $connection);
+ return new AllConfig($systemConfig, $connection);
}
public function testDeleteUserValue(): void {
@@ -147,7 +149,7 @@ class AllConfigTest extends \Test\TestCase {
public function testSetUserValueWithPreConditionFailure(): void {
- $this->expectException(\OCP\PreConditionNotMetException::class);
+ $this->expectException(PreConditionNotMetException::class);
$config = $this->getConfig();
@@ -183,7 +185,7 @@ class AllConfigTest extends \Test\TestCase {
}
public function testSetUserValueWithPreConditionFailureWhenResultStillMatches(): void {
- $this->expectException(\OCP\PreConditionNotMetException::class);
+ $this->expectException(PreConditionNotMetException::class);
$config = $this->getConfig();