1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-11 07:34:12 +02:00

Fix create duplicate records in *GroupHandler

This commit is contained in:
GreYY
2019-01-25 13:06:55 +02:00
parent 4d5b7e6ba1
commit 1adbed5c92
4 changed files with 18 additions and 2 deletions

View File

@@ -99,6 +99,11 @@ class GroupHandlerTest extends TestCase
return $record;
});
$handler->pushProcessor(function ($record) {
$record['extra']['foo2'] = true;
return $record;
});
$handler->handleBatch(array($this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO)));
foreach ($testHandlers as $test) {
$this->assertTrue($test->hasDebugRecords());
@@ -107,6 +112,8 @@ class GroupHandlerTest extends TestCase
$records = $test->getRecords();
$this->assertTrue($records[0]['extra']['foo']);
$this->assertTrue($records[1]['extra']['foo']);
$this->assertTrue($records[0]['extra']['foo2']);
$this->assertTrue($records[1]['extra']['foo2']);
}
}
}