Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F585350
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/tests/phpunit/mocks/TestLogger.php b/tests/phpunit/mocks/TestLogger.php
index 0aebb9c68d2..9960ed33a20 100644
--- a/tests/phpunit/mocks/TestLogger.php
+++ b/tests/phpunit/mocks/TestLogger.php
@@ -1,7 +1,5 @@
<?php
/**
- * Testing logger
- *
* Copyright (C) 2015 Wikimedia Foundation and contributors
*
* This program is free software; you can redistribute it and/or modify
@@ -22,8 +20,6 @@
* @file
*/
-use Psr\Log\LogLevel;
-
/**
* A logger that may be configured to either buffer logs or to print them to
* the output where PHPUnit will complain about them.
@@ -108,24 +104,7 @@ class TestLogger extends \Psr\Log\AbstractLogger {
$this->buffer[] = [ $level, $message ];
}
} else {
- switch ( $level ) {
- case LogLevel::DEBUG:
- case LogLevel::INFO:
- case LogLevel::NOTICE:
- trigger_error( "LOG[$level]: $message", E_USER_NOTICE );
- break;
-
- case LogLevel::WARNING:
- trigger_error( "LOG[$level]: $message", E_USER_WARNING );
- break;
-
- case LogLevel::ERROR:
- case LogLevel::CRITICAL:
- case LogLevel::ALERT:
- case LogLevel::EMERGENCY:
- trigger_error( "LOG[$level]: $message", E_USER_ERROR );
- break;
- }
+ echo "LOG[$level]: $message\n";
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:33 AM (1 d, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227755
Default Alt Text
(1 KB)
Attached To
Mode
rMW mediawiki
Attached
Detach File
Event Timeline
Log In to Comment