summaryrefslogtreecommitdiffstats
path: root/tests/lib/LoggerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/LoggerTest.php')
-rw-r--r--tests/lib/LoggerTest.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/lib/LoggerTest.php b/tests/lib/LoggerTest.php
index 3d0847d6c8a..9f226a395b6 100644
--- a/tests/lib/LoggerTest.php
+++ b/tests/lib/LoggerTest.php
@@ -10,8 +10,9 @@ namespace Test;
use OC\Log;
use OCP\ILogger;
+use OCP\Log\IWriter;
-class LoggerTest extends TestCase implements Log\IWritable {
+class LoggerTest extends TestCase implements IWriter {
/** @var \OC\SystemConfig|\PHPUnit_Framework_MockObject_MockObject */
private $config;
@@ -29,7 +30,7 @@ class LoggerTest extends TestCase implements Log\IWritable {
parent::setUp();
$this->logs = [];
- $this->config = $this->createMock(\OC\SystemConfig::class);
+ $this->config = $this->createMock(\OCP\IConfig::class);
$this->registry = $this->createMock(\OCP\Support\CrashReport\IRegistry::class);
$this->logger = new Log($this, $this->config, null, $this->registry);
}
@@ -44,7 +45,7 @@ class LoggerTest extends TestCase implements Log\IWritable {
public function testAppCondition() {
$this->config->expects($this->any())
- ->method('getValue')
+ ->method('getSystemValue')
->will(($this->returnValueMap([
['loglevel', ILogger::WARN, ILogger::WARN],
['log.condition', [], ['apps' => ['files']]]
@@ -66,7 +67,7 @@ class LoggerTest extends TestCase implements Log\IWritable {
return $this->logs;
}
- public function write($app, $message, $level) {
+ public function write(string $app, $message, int $level) {
$this->logs[]= "$level $message";
}