mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 13:16:39 +02:00
Throw an exception on invalid level name
This commit is contained in:
@@ -25,6 +25,23 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals('foo', $logger->getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Monolog\Logger::getLevelName
|
||||
*/
|
||||
public function testGetLevelName()
|
||||
{
|
||||
$this->assertEquals('ERROR', Logger::getLevelName(Logger::ERROR));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Monolog\Logger::getLevelName
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testGetLevelNameThrows()
|
||||
{
|
||||
Logger::getLevelName(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Monolog\Logger::__construct
|
||||
*/
|
||||
|
Reference in New Issue
Block a user