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

Switch to DateTimeImmutable everywhere

This commit is contained in:
Jordi Boggiano
2016-05-20 20:55:31 +01:00
parent 6d2cfa63c9
commit e27225dc40
23 changed files with 78 additions and 78 deletions

View File

@@ -88,10 +88,10 @@ class DeduplicationHandlerTest extends TestCase
$handler = new DeduplicationHandler($test, sys_get_temp_dir().'/monolog_dedup.log', 0);
$record = $this->getRecord(Logger::ERROR);
$record['datetime']->modify('+62seconds');
$record['datetime'] = $record['datetime']->modify('+62seconds');
$handler->handle($record);
$record = $this->getRecord(Logger::CRITICAL);
$record['datetime']->modify('+62seconds');
$record['datetime'] = $record['datetime']->modify('+62seconds');
$handler->handle($record);
$handler->flush();
@@ -115,13 +115,13 @@ class DeduplicationHandlerTest extends TestCase
// handle two records from yesterday, and one recent
$record = $this->getRecord(Logger::ERROR);
$record['datetime']->modify('-1day -10seconds');
$record['datetime'] = $record['datetime']->modify('-1day -10seconds');
$handler->handle($record);
$record2 = $this->getRecord(Logger::CRITICAL);
$record2['datetime']->modify('-1day -10seconds');
$record2['datetime'] = $record2['datetime']->modify('-1day -10seconds');
$handler->handle($record2);
$record3 = $this->getRecord(Logger::CRITICAL);
$record3['datetime']->modify('-30seconds');
$record3['datetime'] = $record3['datetime']->modify('-30seconds');
$handler->handle($record3);
// log is written as none of them are duplicate