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:
@@ -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');
|
||||
|
Reference in New Issue
Block a user