test: assert plugin logs to injected PSR logger
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5f8cc9bdad
commit
8afe30b476
3 files changed
+128
No files matched your search
@@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace AeonDumpManager\Tests\Support;
|
||||
|
||||
use Psr\Log\AbstractLogger;
|
||||
|
||||
class RecordingLogger extends AbstractLogger
|
||||
{
|
||||
/** @var list<array{level: string, message: string, context: array<mixed>}> */
|
||||
public array $records = [];
|
||||
|
||||
public function log($level, string|\Stringable $message, array $context = []): void
|
||||
{
|
||||
$this->records[] = ['level' => (string) $level, 'message' => (string) $message, 'context' => $context];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user