mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-22 12:53:27 +02:00
Switch to DateTimeImmutable everywhere
This commit is contained in:
@@ -26,7 +26,7 @@ class ChromePHPFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('from' => 'logger'),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('ip' => '127.0.0.1'),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -59,7 +59,7 @@ class ChromePHPFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'CRITICAL',
|
||||
'channel' => 'meh',
|
||||
'context' => array('from' => 'logger'),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('ip' => '127.0.0.1', 'file' => 'test', 'line' => 14),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -92,7 +92,7 @@ class ChromePHPFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'DEBUG',
|
||||
'channel' => 'meh',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -122,7 +122,7 @@ class ChromePHPFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'INFO',
|
||||
'channel' => 'meh',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(),
|
||||
'message' => 'log',
|
||||
),
|
||||
@@ -131,7 +131,7 @@ class ChromePHPFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'WARNING',
|
||||
'channel' => 'foo',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(),
|
||||
'message' => 'log2',
|
||||
),
|
||||
|
@@ -35,7 +35,7 @@ class ElasticaFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('foo' => 7, 'bar', 'class' => new \stdClass),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(),
|
||||
'message' => 'log',
|
||||
);
|
||||
|
@@ -36,7 +36,7 @@ class FluentdFormatterTest extends TestCase
|
||||
public function testFormat()
|
||||
{
|
||||
$record = $this->getRecord(Logger::WARNING);
|
||||
$record['datetime'] = new \DateTime("@0");
|
||||
$record['datetime'] = new \DateTimeImmutable("@0");
|
||||
|
||||
$formatter = new FluentdFormatter();
|
||||
$this->assertEquals(
|
||||
@@ -51,7 +51,7 @@ class FluentdFormatterTest extends TestCase
|
||||
public function testFormatWithTag()
|
||||
{
|
||||
$record = $this->getRecord(Logger::ERROR);
|
||||
$record['datetime'] = new \DateTime("@0");
|
||||
$record['datetime'] = new \DateTimeImmutable("@0");
|
||||
|
||||
$formatter = new FluentdFormatter(true);
|
||||
$this->assertEquals(
|
||||
|
@@ -33,7 +33,7 @@ class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -68,7 +68,7 @@ class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('from' => 'logger'),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('file' => 'test', 'line' => 14),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -106,7 +106,7 @@ class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('from' => 'logger'),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('key' => 'pair'),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -147,7 +147,7 @@ class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'file' => '/some/file/in/dir.php:56',
|
||||
'trace' => array('/some/file/1.php:23', '/some/file/2.php:3'),
|
||||
)),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -171,7 +171,7 @@ class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('from' => 'logger'),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('key' => 'pair'),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -205,7 +205,7 @@ class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('exception' => str_repeat(' ', 32767)),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('key' => str_repeat(' ', 32767)),
|
||||
'message' => 'log'
|
||||
);
|
||||
|
@@ -84,7 +84,7 @@ class JsonFormatterTest extends TestCase
|
||||
'level_name' => 'CRITICAL',
|
||||
'channel' => 'core',
|
||||
'context' => array('exception' => $exception),
|
||||
'datetime' => new \DateTime(),
|
||||
'datetime' => new \DateTimeImmutable(),
|
||||
'extra' => array(),
|
||||
'message' => 'foobar',
|
||||
));
|
||||
@@ -94,7 +94,7 @@ class JsonFormatterTest extends TestCase
|
||||
} else {
|
||||
$path = substr(json_encode($exception->getFile()), 1, -1);
|
||||
}
|
||||
$this->assertEquals('{"level_name":"CRITICAL","channel":"core","context":{"exception":{"class":"RuntimeException","message":"'.$exception->getMessage().'","code":'.$exception->getCode().',"file":"'.$path.':'.$exception->getLine().'"}},"datetime":'.json_encode(new \DateTime()).',"extra":[],"message":"foobar"}'."\n", $message);
|
||||
$this->assertEquals('{"level_name":"CRITICAL","channel":"core","context":{"exception":{"class":"RuntimeException","message":"'.$exception->getMessage().'","code":'.$exception->getCode().',"file":"'.$path.':'.$exception->getLine().'"}},"datetime":'.json_encode(new \DateTimeImmutable()).',"extra":[],"message":"foobar"}'."\n", $message);
|
||||
}
|
||||
|
||||
public function testDefFormatWithPreviousException()
|
||||
@@ -105,7 +105,7 @@ class JsonFormatterTest extends TestCase
|
||||
'level_name' => 'CRITICAL',
|
||||
'channel' => 'core',
|
||||
'context' => array('exception' => $exception),
|
||||
'datetime' => new \DateTime(),
|
||||
'datetime' => new \DateTimeImmutable(),
|
||||
'extra' => array(),
|
||||
'message' => 'foobar',
|
||||
));
|
||||
@@ -117,6 +117,6 @@ class JsonFormatterTest extends TestCase
|
||||
$pathPrevious = substr(json_encode($exception->getPrevious()->getFile()), 1, -1);
|
||||
$pathException = substr(json_encode($exception->getFile()), 1, -1);
|
||||
}
|
||||
$this->assertEquals('{"level_name":"CRITICAL","channel":"core","context":{"exception":{"class":"RuntimeException","message":"'.$exception->getMessage().'","code":'.$exception->getCode().',"file":"'.$pathException.':'.$exception->getLine().'","previous":{"class":"LogicException","message":"'.$exception->getPrevious()->getMessage().'","code":'.$exception->getPrevious()->getCode().',"file":"'.$pathPrevious.':'.$exception->getPrevious()->getLine().'"}}},"datetime":'.json_encode(new \DateTime()).',"extra":[],"message":"foobar"}'."\n", $message);
|
||||
$this->assertEquals('{"level_name":"CRITICAL","channel":"core","context":{"exception":{"class":"RuntimeException","message":"'.$exception->getMessage().'","code":'.$exception->getCode().',"file":"'.$pathException.':'.$exception->getLine().'","previous":{"class":"LogicException","message":"'.$exception->getPrevious()->getMessage().'","code":'.$exception->getPrevious()->getCode().',"file":"'.$pathPrevious.':'.$exception->getPrevious()->getLine().'"}}},"datetime":'.json_encode(new \DateTimeImmutable()).',"extra":[],"message":"foobar"}'."\n", $message);
|
||||
}
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'channel' => 'log',
|
||||
'context' => array(),
|
||||
'message' => 'foo',
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array(),
|
||||
));
|
||||
$this->assertEquals('['.date('Y-m-d').'] log.WARNING: foo [] []'."\n", $message);
|
||||
@@ -37,7 +37,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'message' => 'foo',
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array(),
|
||||
'context' => array(
|
||||
'foo' => 'bar',
|
||||
@@ -56,7 +56,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array('ip' => '127.0.0.1'),
|
||||
'message' => 'log',
|
||||
));
|
||||
@@ -70,7 +70,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array('ip' => '127.0.0.1', 'file' => 'test'),
|
||||
'message' => 'log',
|
||||
));
|
||||
@@ -84,7 +84,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array(),
|
||||
'message' => 'log',
|
||||
));
|
||||
@@ -98,7 +98,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('foo' => 'bar'),
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array('foo' => 'xbar'),
|
||||
'message' => 'log',
|
||||
));
|
||||
@@ -112,7 +112,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array('foo' => new TestFoo, 'bar' => new TestBar, 'baz' => array(), 'res' => fopen('php://memory', 'rb')),
|
||||
'message' => 'foobar',
|
||||
));
|
||||
@@ -127,7 +127,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'CRITICAL',
|
||||
'channel' => 'core',
|
||||
'context' => array('exception' => new \RuntimeException('Foo')),
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array(),
|
||||
'message' => 'foobar',
|
||||
));
|
||||
@@ -145,7 +145,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'CRITICAL',
|
||||
'channel' => 'core',
|
||||
'context' => array('exception' => new \RuntimeException('Foo', 0, $previous)),
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array(),
|
||||
'message' => 'foobar',
|
||||
));
|
||||
@@ -164,7 +164,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'channel' => 'test',
|
||||
'message' => 'bar',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array(),
|
||||
),
|
||||
array(
|
||||
@@ -172,7 +172,7 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'channel' => 'log',
|
||||
'message' => 'foo',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array(),
|
||||
),
|
||||
));
|
||||
|
@@ -36,6 +36,6 @@ class LogglyFormatterTest extends TestCase
|
||||
$formatted_decoded = json_decode($formatter->format($record), true);
|
||||
$this->assertArrayNotHasKey("datetime", $formatted_decoded);
|
||||
$this->assertArrayHasKey("timestamp", $formatted_decoded);
|
||||
$this->assertEquals(new \DateTime($formatted_decoded["timestamp"]), $record["datetime"]);
|
||||
$this->assertEquals(new \DateTimeImmutable($formatted_decoded["timestamp"]), $record["datetime"]);
|
||||
}
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -66,7 +66,7 @@ class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('from' => 'logger'),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('file' => 'test', 'line' => 14),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -88,7 +88,7 @@ class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('from' => 'logger'),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('key' => 'pair'),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -117,7 +117,7 @@ class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('from' => 'logger'),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('key' => 'pair'),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -143,7 +143,7 @@ class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('from' => 'logger'),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('key' => 'pair'),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -162,7 +162,7 @@ class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => '¯\_(ツ)_/¯',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(
|
||||
'user_agent' => "\xD6WN; FBCR/OrangeEspa\xF1a; Vers\xE3o/4.0; F\xE4rist",
|
||||
),
|
||||
|
@@ -62,7 +62,7 @@ class MongoDBFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level' => Logger::WARNING,
|
||||
'level_name' => Logger::getLevelName(Logger::WARNING),
|
||||
'channel' => 'test',
|
||||
'datetime' => new \DateTime('2016-01-21T21:11:30.123456+00:00'),
|
||||
'datetime' => new \DateTimeImmutable('2016-01-21T21:11:30.123456+00:00'),
|
||||
'extra' => array(),
|
||||
);
|
||||
|
||||
@@ -89,7 +89,7 @@ class MongoDBFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
$record = array(
|
||||
'message' => 'some log message',
|
||||
'context' => array(
|
||||
'stuff' => new \DateTime('1969-01-21T21:11:30.123456+00:00'),
|
||||
'stuff' => new \DateTimeImmutable('1969-01-21T21:11:30.123456+00:00'),
|
||||
'some_object' => $someObject,
|
||||
'context_string' => 'some string',
|
||||
'context_int' => 123456,
|
||||
@@ -98,7 +98,7 @@ class MongoDBFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level' => Logger::WARNING,
|
||||
'level_name' => Logger::getLevelName(Logger::WARNING),
|
||||
'channel' => 'test',
|
||||
'datetime' => new \DateTime('2016-01-21T21:11:30.123456+00:00'),
|
||||
'datetime' => new \DateTimeImmutable('2016-01-21T21:11:30.123456+00:00'),
|
||||
'extra' => array(),
|
||||
);
|
||||
|
||||
@@ -145,7 +145,7 @@ class MongoDBFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level' => Logger::WARNING,
|
||||
'level_name' => Logger::getLevelName(Logger::WARNING),
|
||||
'channel' => 'test',
|
||||
'datetime' => new \DateTime('2016-01-21T21:11:30.123456+00:00'),
|
||||
'datetime' => new \DateTimeImmutable('2016-01-21T21:11:30.123456+00:00'),
|
||||
'extra' => array(),
|
||||
);
|
||||
|
||||
@@ -181,7 +181,7 @@ class MongoDBFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level' => Logger::WARNING,
|
||||
'level_name' => Logger::getLevelName(Logger::WARNING),
|
||||
'channel' => 'test',
|
||||
'datetime' => new \DateTime('2016-01-21T21:11:30.123456+00:00'),
|
||||
'datetime' => new \DateTimeImmutable('2016-01-21T21:11:30.123456+00:00'),
|
||||
'extra' => array(),
|
||||
);
|
||||
|
||||
@@ -220,7 +220,7 @@ class MongoDBFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level' => Logger::WARNING,
|
||||
'level_name' => Logger::getLevelName(Logger::WARNING),
|
||||
'channel' => 'test',
|
||||
'datetime' => new \DateTime('2016-01-21T21:11:30.123456+00:00'),
|
||||
'datetime' => new \DateTimeImmutable('2016-01-21T21:11:30.123456+00:00'),
|
||||
'extra' => array(),
|
||||
);
|
||||
|
||||
@@ -249,7 +249,7 @@ class MongoDBFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level' => Logger::WARNING,
|
||||
'level_name' => Logger::getLevelName(Logger::WARNING),
|
||||
'channel' => 'test',
|
||||
'datetime' => new \DateTime('2016-01-21T21:11:30.123456+00:00'),
|
||||
'datetime' => new \DateTimeImmutable('2016-01-21T21:11:30.123456+00:00'),
|
||||
'extra' => array(),
|
||||
);
|
||||
|
||||
|
@@ -30,7 +30,7 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'message' => 'foo',
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array('foo' => new TestFooNorm, 'bar' => new TestBarNorm, 'baz' => array(), 'res' => fopen('php://memory', 'rb')),
|
||||
'context' => array(
|
||||
'foo' => 'bar',
|
||||
@@ -103,7 +103,7 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'channel' => 'test',
|
||||
'message' => 'bar',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array(),
|
||||
),
|
||||
array(
|
||||
@@ -111,7 +111,7 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'channel' => 'log',
|
||||
'message' => 'foo',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime,
|
||||
'datetime' => new \DateTimeImmutable,
|
||||
'extra' => array(),
|
||||
),
|
||||
));
|
||||
|
@@ -49,7 +49,7 @@ class ScalarFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'baz' => false,
|
||||
'bam' => array(1, 2, 3),
|
||||
'bat' => array('foo' => 'bar'),
|
||||
'bap' => \DateTime::createFromFormat(\DateTime::ISO8601, '1970-01-01T00:00:00+0000'),
|
||||
'bap' => \DateTimeImmutable::createFromFormat(\DateTime::ISO8601, '1970-01-01T00:00:00+0000'),
|
||||
'ban' => $exception,
|
||||
));
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('from' => 'logger'),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('ip' => '127.0.0.1'),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -51,7 +51,7 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('from' => 'logger'),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array('ip' => '127.0.0.1', 'file' => 'test', 'line' => 14),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -76,7 +76,7 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -101,7 +101,7 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array(),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(),
|
||||
'message' => 'log',
|
||||
);
|
||||
@@ -127,7 +127,7 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
array('bar1', 'bar2', 'bar3'),
|
||||
),
|
||||
),
|
||||
'datetime' => new \DateTime("@0"),
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(),
|
||||
'message' => 'table-message',
|
||||
);
|
||||
|
Reference in New Issue
Block a user