1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-10 23:24:02 +02:00
This commit is contained in:
Jordi Boggiano
2022-03-14 14:11:15 +01:00
parent 0aef68ce10
commit a3ba6445a4
6 changed files with 16 additions and 16 deletions

View File

@@ -253,21 +253,19 @@ class MongoDBFormatterTest extends TestCase
public function testBsonTypes()
{
$record = [
'message' => 'some log message',
'context' => [
$record = $this->getRecord(
message: 'some log message',
context: [
'objectid' => new ObjectId(),
'nest' => [
'timestamp' => new UTCDateTime(),
'regex' => new Regex('pattern'),
],
],
'level' => Logger::WARNING,
'level_name' => Logger::getLevelName(Logger::WARNING),
'channel' => 'test',
'datetime' => new \DateTimeImmutable('2016-01-21T21:11:30.123456+00:00'),
'extra' => [],
];
level: Logger::WARNING,
channel: 'test',
datetime: new \DateTimeImmutable('2016-01-21T21:11:30.123456+00:00'),
);
$formatter = new MongoDBFormatter();
$formattedRecord = $formatter->format($record);