symfony_example_app/tests/Common/LoggerTrait.php
Ondrej Vlach bf65ce058d
feat: add UsetrenoHttpClient
!fixup bb244e40f5fa42294acc7cc7f925796325ada4c5
2024-01-18 14:25:05 +01:00

19 lines
312 B
PHP

<?php
namespace App\Tests\Common;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
trait LoggerTrait
{
/**
* @return Logger
*/
protected function getLogger(): Logger {
$logger = new Logger('test');
$logger->pushHandler(new TestHandler());
return $logger;
}
}