25 $handler = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractProcessingHandler', array(
Logger::WARNING,
true));
34 $handler = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractProcessingHandler', array(
Logger::DEBUG,
true));
35 $this->assertFalse(
$handler->handle($this->getRecord()));
43 $handler = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractProcessingHandler', array(
Logger::DEBUG,
false));
44 $this->assertTrue(
$handler->handle($this->getRecord()));
52 $handler = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractProcessingHandler', array(
Logger::WARNING,
false));
53 $this->assertTrue(
$handler->handle($this->getRecord()));
62 $handler = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractProcessingHandler');
65 'REQUEST_METHOD' =>
'',
70 $handledRecord =
null;
73 ->will($this->returnCallback(
function ($record) use (&$handledRecord) {
74 $handledRecord = $record;
78 $this->assertEquals(6, count($handledRecord[
'extra']));
An exception for terminatinating execution or to throw for unit testing.
testHandleNotBubbling()
@covers Monolog\Handler\AbstractProcessingHandler::handle
testHandleIsFalseWhenNotHandled()
@covers Monolog\Handler\AbstractProcessingHandler::handle
testProcessRecord()
@covers Monolog\Handler\AbstractProcessingHandler::processRecord
testHandleBubbling()
@covers Monolog\Handler\AbstractProcessingHandler::handle
testHandleLowerLevelMessage()
@covers Monolog\Handler\AbstractProcessingHandler::handle
const WARNING
Exceptional occurrences that are not errors.
const DEBUG
Detailed debug information.
Injects url/method and remote IP of the current web request in all records.
getRecord($level=Logger::WARNING, $message='test', $context=array())
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.