1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 16:46:11 +02:00

Merge branch '1.x'

This commit is contained in:
Jordi Boggiano
2018-06-18 15:52:19 +02:00
2 changed files with 55 additions and 3 deletions

View File

@@ -86,12 +86,18 @@ class TestHandler extends AbstractProcessingHandler
public function hasRecord($record, $level)
{
if (is_array($record)) {
$record = $record['message'];
if (is_string($record)) {
$record = array('message' => $record);
}
return $this->hasRecordThatPasses(function ($rec) use ($record) {
return $rec['message'] === $record;
if ($rec['message'] !== $record['message']) {
return false;
}
if (isset($record['context']) && $rec['context'] !== $record['context']) {
return false;
}
return true;
}, $level);
}