1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-17 18:36:32 +02:00

Merge branch '2.x'

This commit is contained in:
Jordi Boggiano
2023-10-27 15:24:31 +02:00
4 changed files with 25 additions and 5 deletions

View File

@@ -402,6 +402,20 @@ class NormalizerFormatterTest extends TestCase
);
}
public function testCanNormalizeIncompleteObject(): void
{
$serialized = "O:17:\"Monolog\TestClass\":1:{s:23:\"\x00Monolog\TestClass\x00name\";s:4:\"test\";}";
$object = unserialize($serialized);
$formatter = new NormalizerFormatter();
$record = $this->getRecord(context: ['object' => $object]);
$result = $formatter->format($record);
$this->assertEquals([
'__PHP_Incomplete_Class' => 'Monolog\\TestClass',
], $result['context']['object']);
}
private function throwHelper($arg)
{
throw new \RuntimeException('Thrown');