38 foreach ($testHandlers as
$test) {
39 $this->assertTrue(
$test->hasDebugRecords());
40 $this->assertTrue(
$test->hasInfoRecords());
41 $this->assertTrue(count(
$test->getRecords()) === 2);
53 foreach ($testHandlers as
$test) {
54 $this->assertTrue(
$test->hasDebugRecords());
55 $this->assertTrue(
$test->hasInfoRecords());
56 $this->assertTrue(count(
$test->getRecords()) === 2);
67 $this->assertTrue($handler->isHandling($this->getRecord(
Logger::ERROR)));
68 $this->assertTrue($handler->isHandling($this->getRecord(
Logger::WARNING)));
69 $this->assertFalse($handler->isHandling($this->getRecord(
Logger::DEBUG)));
79 $handler->pushProcessor(
function ($record) {
80 $record[
'extra'][
'foo'] =
true;
85 $this->assertTrue(
$test->hasWarningRecords());
87 $this->assertTrue(
$records[0][
'extra'][
'foo']);
98 $handler->pushProcessor(
function ($record) {
99 $record[
'extra'][
'foo'] =
true;
104 $this->assertTrue(
$test->hasWarningRecords());
106 $this->assertTrue(
$records[0][
'extra'][
'foo']);
117 parent::handle($record);
119 throw new \Exception(
"ExceptionTestHandler::handle");
handle(array $record)
{{Handles a record.All records may be passed to this method, and the handler should discard those tha...
Used for testing purposes.
testHandleBatch()
@covers Monolog\Handler\WhatFailureGroupHandler::handleBatch
testHandle()
@covers Monolog\Handler\WhatFailureGroupHandler::__construct @covers Monolog\Handler\WhatFailureGroup...
testHandleUsesProcessors()
@covers Monolog\Handler\WhatFailureGroupHandler::handle
testConstructorOnlyTakesHandler()
@covers Monolog\Handler\WhatFailureGroupHandler::__construct @expectedException InvalidArgumentExcept...
testHandleException()
@covers Monolog\Handler\WhatFailureGroupHandler::handle
testIsHandling()
@covers Monolog\Handler\WhatFailureGroupHandler::isHandling
Forwards records to multiple handlers suppressing failures of each handler and continuing through to ...
const ERROR
Runtime errors.
const WARNING
Exceptional occurrences that are not errors.
const INFO
Interesting events.
const DEBUG
Detailed debug information.
getRecord($level=Logger::WARNING, $message='test', $context=array())