new ErrorLevelActivationStrategy(Logger::WARNING
) );
self::
assertEquals($expected,
$strategy->
isHandlerActivated($record));
} public static function isActivatedProvider(): array
{ return [ ['/test', RecordFactory::
create(Logger::ERROR
), true
],
['/400', RecordFactory::
create(Logger::ERROR, context: self::
getContextException(400
)), true
],
['/400/a', RecordFactory::
create(Logger::ERROR, context: self::
getContextException(400
)), false
],
['/400/b', RecordFactory::
create(Logger::ERROR, context: self::
getContextException(400
)), false
],
['/400/c', RecordFactory::
create(Logger::ERROR, context: self::
getContextException(400
)), true
],
['/401', RecordFactory::
create(Logger::ERROR, context: self::
getContextException(401
)), true
],
['/403', RecordFactory::
create(Logger::ERROR, context: self::
getContextException(403
)), false
],
['/404', RecordFactory::
create(Logger::ERROR, context: self::
getContextException(404
)), false
],
['/405', RecordFactory::
create(Logger::ERROR, context: self::
getContextException(405
)), false
],
['/500', RecordFactory::
create(Logger::ERROR, context: self::
getContextException(500
)), true
],
];
}