1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 17:46:09 +02:00

Add our own DateTime implementation to provide nicer JSON output, fixes #736

This commit is contained in:
Jordi Boggiano
2016-05-20 21:22:48 +01:00
parent e27225dc40
commit 912d813c73
4 changed files with 65 additions and 8 deletions

View File

@@ -12,6 +12,7 @@
namespace Monolog\Test;
use Monolog\Logger;
use Monolog\DateTimeImmutable;
/**
* Lets you easily generate log records and a dummy formatter for testing purposes
@@ -31,7 +32,7 @@ class TestCase extends \PHPUnit_Framework_TestCase
'level' => $level,
'level_name' => Logger::getLevelName($level),
'channel' => 'test',
'datetime' => \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', microtime(true))),
'datetime' => new DateTimeImmutable(true),
'extra' => array(),
);
}