aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/LoggerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/LoggerTest.php')
-rw-r--r--tests/lib/LoggerTest.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/lib/LoggerTest.php b/tests/lib/LoggerTest.php
index c7c60e892aa..972626eccb4 100644
--- a/tests/lib/LoggerTest.php
+++ b/tests/lib/LoggerTest.php
@@ -38,9 +38,9 @@ class LoggerTest extends TestCase implements IWriter {
private function mockDefaultLogLevel(): void {
$this->config->expects($this->any())
->method('getValue')
- ->will(($this->returnValueMap([
+ ->willReturnMap([
['loglevel', ILogger::WARN, ILogger::WARN],
- ])));
+ ]);
}
public function testInterpolation(): void {
@@ -55,10 +55,10 @@ class LoggerTest extends TestCase implements IWriter {
public function testAppCondition(): void {
$this->config->expects($this->any())
->method('getValue')
- ->will(($this->returnValueMap([
+ ->willReturnMap([
['loglevel', ILogger::WARN, ILogger::WARN],
['log.condition', [], ['apps' => ['files']]]
- ])));
+ ]);
$logger = $this->logger;
$logger->info('Don\'t display info messages');
@@ -72,7 +72,7 @@ class LoggerTest extends TestCase implements IWriter {
$this->assertEquals($expected, $this->getLogs());
}
- public function dataMatchesCondition(): array {
+ public static function dataMatchesCondition(): array {
return [
[
'user0',
@@ -181,7 +181,7 @@ class LoggerTest extends TestCase implements IWriter {
$this->logs[] = $level . ' ' . $textMessage;
}
- public function userAndPasswordData(): array {
+ public static function userAndPasswordData(): array {
return [
['mySpecialUsername', 'MySuperSecretPassword'],
['my-user', '324324()#รค234'],
@@ -291,7 +291,7 @@ class LoggerTest extends TestCase implements IWriter {
*/
public function testDetectclosure(string $user, string $password): void {
$this->mockDefaultLogLevel();
- $a = function ($user, $password) {
+ $a = function ($user, $password): void {
throw new \Exception('test');
};
$this->registry->expects($this->once())