use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Monolog\Processor\DebugProcessor;
use Symfony\Bridge\Monolog\Tests\RecordFactory;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
class DebugProcessorTest extends TestCase
{ public function testDatetimeFormat() { $record = RecordFactory::
create(datetime:
new \
DateTimeImmutable('2019-01-01T00:01:00+00:00'
));
$processor =
new DebugProcessor();
$processor($record);
$records =
$processor->
getLogs();
self::
assertCount(1,
$records);
self::
assertSame(1546300860,
$records[0
]['timestamp'
]);
} public function testDatetimeRfc3339Format() { $record = RecordFactory::
create(datetime:
new \
DateTimeImmutable('2019-01-01T00:01:00+00:00'
));
$processor =
new DebugProcessor();