123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
-
-
-
- namespace Monolog\Formatter;
-
- use Monolog\Logger;
- use Monolog\TestCase;
-
- class JsonFormatterTest extends TestCase
- {
-
-
- public function testFormat()
- {
- $formatter = new JsonFormatter();
- $record = $this->getRecord();
- $this->assertEquals(json_encode($record), $formatter->format($record));
- }
-
-
-
- public function testFormatBatch()
- {
- $formatter = new JsonFormatter();
- $records = array(
- $this->getRecord(Logger::WARNING),
- $this->getRecord(Logger::DEBUG),
- );
- $this->assertEquals(json_encode($records), $formatter->formatBatch($records));
- }
- }
|