aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Log/FileTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Log/FileTest.php')
-rw-r--r--tests/lib/Log/FileTest.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/lib/Log/FileTest.php b/tests/lib/Log/FileTest.php
index b483da969f4..3f030665fb4 100644
--- a/tests/lib/Log/FileTest.php
+++ b/tests/lib/Log/FileTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
*
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
@@ -8,8 +9,10 @@
namespace Test\Log;
use OC\Log\File;
+use OC\SystemConfig;
use OCP\IConfig;
use OCP\ILogger;
+use OCP\Server;
use Test\TestCase;
/**
@@ -24,7 +27,7 @@ class FileTest extends TestCase {
protected function setUp(): void {
parent::setUp();
- $config = \OC::$server->getSystemConfig();
+ $config = Server::get(SystemConfig::class);
$this->restore_logfile = $config->getValue('logfile');
$this->restore_logdateformat = $config->getValue('logdateformat');
@@ -32,7 +35,7 @@ class FileTest extends TestCase {
$this->logFile = new File($config->getValue('datadirectory') . '/logtest.log', '', $config);
}
protected function tearDown(): void {
- $config = \OC::$server->getSystemConfig();
+ $config = Server::get(SystemConfig::class);
if (isset($this->restore_logfile)) {
$config->getValue('logfile', $this->restore_logfile);
} else {
@@ -48,7 +51,7 @@ class FileTest extends TestCase {
}
public function testLogging(): void {
- $config = \OC::$server->get(IConfig::class);
+ $config = Server::get(IConfig::class);
# delete old logfile
unlink($config->getSystemValue('logfile'));
@@ -69,7 +72,7 @@ class FileTest extends TestCase {
}
public function testMicrosecondsLogTimestamp(): void {
- $config = \OC::$server->getConfig();
+ $config = Server::get(IConfig::class);
# delete old logfile
unlink($config->getSystemValue('logfile'));