ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Provides a base test class for ensuring compliance with the LoggerInterface. More...
Public Member Functions | |
getLogger () | |
getLogs () | |
This must return the log messages in order. More... | |
testImplements () | |
testLogsAtAllLevels ($level, $message) | |
@dataProvider provideLevelsAndMessages More... | |
provideLevelsAndMessages () | |
testThrowsOnInvalidLevel () | |
@expectedException \Psr\Log\InvalidArgumentException More... | |
testContextReplacement () | |
testObjectCastToString () | |
testContextCanContainAnything () | |
testContextExceptionKeyCanBeExceptionOrOtherValues () | |
Provides a base test class for ensuring compliance with the LoggerInterface.
Implementors can extend the class and implement abstract methods to run this as part of their test suite.
Definition at line 14 of file LoggerInterfaceTest.php.
|
abstract |
Reimplemented in Monolog\PsrLogCompatTest.
Referenced by Psr\Log\Test\LoggerInterfaceTest\testImplements(), and Psr\Log\Test\LoggerInterfaceTest\testLogsAtAllLevels().
|
abstract |
This must return the log messages in order.
The simple formatting of the messages is: "<LOG LEVEL> <MESSAGE>".
Example ->error('Foo') would yield "error Foo".
Reimplemented in Monolog\PsrLogCompatTest.
Psr\Log\Test\LoggerInterfaceTest::provideLevelsAndMessages | ( | ) |
Definition at line 53 of file LoggerInterfaceTest.php.
References Psr\Log\LogLevel\ALERT, Psr\Log\LogLevel\CRITICAL, Psr\Log\LogLevel\DEBUG, Psr\Log\LogLevel\EMERGENCY, Psr\Log\LogLevel\ERROR, Psr\Log\LogLevel\INFO, Psr\Log\LogLevel\NOTICE, and Psr\Log\LogLevel\WARNING.
Psr\Log\Test\LoggerInterfaceTest::testContextCanContainAnything | ( | ) |
Definition at line 102 of file LoggerInterfaceTest.php.
Psr\Log\Test\LoggerInterfaceTest::testContextExceptionKeyCanBeExceptionOrOtherValues | ( | ) |
Definition at line 121 of file LoggerInterfaceTest.php.
Psr\Log\Test\LoggerInterfaceTest::testContextReplacement | ( | ) |
Definition at line 76 of file LoggerInterfaceTest.php.
Psr\Log\Test\LoggerInterfaceTest::testImplements | ( | ) |
Definition at line 32 of file LoggerInterfaceTest.php.
References Psr\Log\Test\LoggerInterfaceTest\getLogger().
Psr\Log\Test\LoggerInterfaceTest::testLogsAtAllLevels | ( | $level, | |
$message | |||
) |
@dataProvider provideLevelsAndMessages
Definition at line 40 of file LoggerInterfaceTest.php.
References Psr\Log\Test\LoggerInterfaceTest\getLogger().
Psr\Log\Test\LoggerInterfaceTest::testObjectCastToString | ( | ) |
Definition at line 85 of file LoggerInterfaceTest.php.
Psr\Log\Test\LoggerInterfaceTest::testThrowsOnInvalidLevel | ( | ) |
@expectedException \Psr\Log\InvalidArgumentException
Definition at line 70 of file LoggerInterfaceTest.php.