public function LoggerInterfaceTest::testContextExceptionKeyCanBeExceptionOrOtherValues in Lockr 7.3
File
- vendor/
psr/ log/ Psr/ Log/ Test/ LoggerInterfaceTest.php, line 125
Class
- LoggerInterfaceTest
- Provides a base test class for ensuring compliance with the LoggerInterface.
Namespace
Psr\Log\TestCode
public function testContextExceptionKeyCanBeExceptionOrOtherValues() {
$logger = $this
->getLogger();
$logger
->warning('Random message', array(
'exception' => 'oops',
));
$logger
->critical('Uncaught Exception!', array(
'exception' => new \LogicException('Fail'),
));
$expected = array(
'warning Random message',
'critical Uncaught Exception!',
);
$this
->assertEquals($expected, $this
->getLogs());
}