1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-08 22:26:41 +02:00

Changed the FormatterInterface to return only the formatted message and added a batch formatting method

This commit is contained in:
Christophe Coevoet
2011-05-07 00:44:20 +02:00
parent d7f98df9ab
commit 7ebcc6420f
9 changed files with 69 additions and 28 deletions

View File

@@ -18,13 +18,13 @@ class JsonFormatterTest extends \PHPUnit_Framework_TestCase
public function testFormat()
{
$formatter = new JsonFormatter();
$record = $formatter->format($msg = array(
$message = $formatter->format($msg = array(
'level_name' => 'WARNING',
'channel' => 'log',
'message' => array('foo'),
'datetime' => new \DateTime,
'extra' => array(),
));
$this->assertEquals(json_encode($msg), $record['message']);
$this->assertEquals(json_encode($msg), $message);
}
}