1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-05 12:47:39 +02:00

Fix serializability of Logger class, fixes #1792

This commit is contained in:
Jordi Boggiano
2023-02-06 14:33:41 +01:00
parent e1c0ae1528
commit 2ae044482c
2 changed files with 37 additions and 1 deletions

View File

@@ -697,6 +697,12 @@ class LoggerTest extends \PHPUnit\Framework\TestCase
$logger->info('test');
}
public function testSerializable()
{
$logger = new Logger(__METHOD__);
self::assertInstanceOf(Logger::class, unserialize(serialize($logger)));
}
public function testReset()
{
$logger = new Logger('app');
@@ -901,4 +907,4 @@ class FiberSuspendHandler implements HandlerInterface
public function close(): void
{
}
}
}