1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-28 07:19:54 +02:00

Merge remote-tracking branch 'origin/1.0' into 1.x

This commit is contained in:
Jordi Boggiano
2016-03-01 15:40:28 +00:00
3 changed files with 29 additions and 0 deletions

View File

@@ -33,6 +33,19 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('ERROR', Logger::getLevelName(Logger::ERROR));
}
/**
* @covers Monolog\Logger::withName
*/
public function testWithName()
{
$first = new Logger('first', array($handler = new TestHandler()));
$second = $first->withName('second');
$this->assertSame('first', $first->getName());
$this->assertSame('second', $second->getName());
$this->assertSame($handler, $second->popHandler());
}
/**
* @covers Monolog\Logger::toMonologLevel
*/