Don't use deprecated TestLogger class

Signed-off-by: Alexander M. Turek <me@derrabus.de>
This commit is contained in:
Alexander M. Turek 2021-07-18 18:17:37 +02:00
parent 5ec14aa468
commit 3ea73c7b1d
1 changed files with 15 additions and 1 deletions

View File

@ -12,8 +12,8 @@
namespace Symfony\Component\Cache\Tests\Messenger;
use PHPUnit\Framework\TestCase;
use Psr\Log\AbstractLogger;
use Psr\Log\LoggerInterface;
use Psr\Log\Test\TestLogger;
use Symfony\Component\Cache\Adapter\AdapterInterface;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\CacheItem;
@ -132,3 +132,17 @@ class EarlyExpirationDispatcherTest extends TestCase
$this->assertSame($expected, $logger->records);
}
}
final class TestLogger extends AbstractLogger
{
public $records = [];
public function log($level, $message, array $context = []): void
{
$this->records[] = [
'level' => $level,
'message' => $message,
'context' => $context,
];
}
}