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']);
testHandle()
@covers Monolog\Handler\GroupHandler::__construct @covers Monolog\Handler\GroupHandler::handle
testHandleUsesProcessors()
@covers Monolog\Handler\GroupHandler::handle
testIsHandling()
@covers Monolog\Handler\GroupHandler::isHandling
testConstructorOnlyTakesHandler()
@covers Monolog\Handler\GroupHandler::__construct @expectedException InvalidArgumentException
testHandleBatch()
@covers Monolog\Handler\GroupHandler::handleBatch
Forwards records to multiple handlers.
Used for testing purposes.
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())