mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-07 21:56:31 +02:00
Refactored / Renamed the CategoryErrorLevelActivationStrategy to the
more appropriate ChannelLevelActivationStrategy.
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Monolog\Handler\FingersCrossed;
|
|||||||
*
|
*
|
||||||
* @author Mike Meessen <netmikey@gmail.com>
|
* @author Mike Meessen <netmikey@gmail.com>
|
||||||
*/
|
*/
|
||||||
class CategoryErrorLevelActivationStrategy implements ActivationStrategyInterface
|
class ChannelLevelActivationStrategy implements ActivationStrategyInterface
|
||||||
{
|
{
|
||||||
private $defaultActionLevel;
|
private $defaultActionLevel;
|
||||||
private $channelToActionLevel;
|
private $channelToActionLevel;
|
@@ -14,7 +14,7 @@ namespace Monolog\Handler;
|
|||||||
use Monolog\TestCase;
|
use Monolog\TestCase;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy;
|
use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy;
|
||||||
use Monolog\Handler\FingersCrossed\CategoryErrorLevelActivationStrategy;
|
use Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy;
|
||||||
|
|
||||||
class FingersCrossedHandlerTest extends TestCase
|
class FingersCrossedHandlerTest extends TestCase
|
||||||
{
|
{
|
||||||
@@ -156,7 +156,7 @@ class FingersCrossedHandlerTest extends TestCase
|
|||||||
public function testCategoryErrorLevelActivationStrategy()
|
public function testCategoryErrorLevelActivationStrategy()
|
||||||
{
|
{
|
||||||
$test = new TestHandler();
|
$test = new TestHandler();
|
||||||
$handler = new FingersCrossedHandler($test, new CategoryErrorLevelActivationStrategy(Logger::ERROR, array('othertest' => Logger::DEBUG)));
|
$handler = new FingersCrossedHandler($test, new ChannelLevelActivationStrategy(Logger::ERROR, array('othertest' => Logger::DEBUG)));
|
||||||
$handler->handle($this->getRecord(Logger::WARNING));
|
$handler->handle($this->getRecord(Logger::WARNING));
|
||||||
$this->assertFalse($test->hasWarningRecords());
|
$this->assertFalse($test->hasWarningRecords());
|
||||||
$record = $this->getRecord(Logger::DEBUG);
|
$record = $this->getRecord(Logger::DEBUG);
|
||||||
|
Reference in New Issue
Block a user