1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-08 06:06:40 +02:00

FingersCrossedHandler fix passthruLevel checking (Fixes #1800) (#1801)

This commit is contained in:
Pitchaya Boonsarngsuk
2023-06-20 13:19:37 +01:00
committed by GitHub
parent b05bf55097
commit 06276fcf77
2 changed files with 6 additions and 3 deletions

View File

@@ -259,9 +259,11 @@ class FingersCrossedHandlerTest extends TestCase
$handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy(Level::Warning), 0, true, true, Level::Info);
$handler->handle($this->getRecord(Level::Debug));
$handler->handle($this->getRecord(Level::Info));
$handler->handle($this->getRecord(Level::Notice));
$handler->close();
$this->assertFalse($test->hasDebugRecords());
$this->assertTrue($test->hasInfoRecords());
$this->assertTrue($test->hasNoticeRecords());
}
/**
@@ -273,8 +275,10 @@ class FingersCrossedHandlerTest extends TestCase
$handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy(Level::Warning), 0, true, true, LogLevel::INFO);
$handler->handle($this->getRecord(Level::Debug));
$handler->handle($this->getRecord(Level::Info));
$handler->handle($this->getRecord(Level::Notice));
$handler->close();
$this->assertFalse($test->hasDebugRecords());
$this->assertTrue($test->hasInfoRecords());
$this->assertTrue($test->hasNoticeRecords());
}
}