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

Override getDefaultFormatter instead of creating a formatter with 'new' in method 'write'. Using levelMap again. Refactored test.

This commit is contained in:
ChristianB
2013-01-31 07:22:52 +01:00
parent b4b2d91c67
commit a2162c1787
2 changed files with 23 additions and 3 deletions

View File

@@ -45,9 +45,11 @@ class ZendMonitorHandlerTest extends TestCase
->setMethods(array('writeZendMonitorCustomEvent'))
->getMock();
$levelMap = $zendMonitor->getLevelMap();
$zendMonitor->expects($this->once())
->method('writeZendMonitorCustomEvent')
->with($record['level'], $record['message']);
->with($levelMap[$record['level']], $record['message']);
$zendMonitor->handle($record);
}