1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-11 15:44:34 +02:00
This commit is contained in:
Jordi Boggiano
2016-05-26 20:54:06 +01:00
parent 85e43a5e7b
commit f200e79879
115 changed files with 1138 additions and 1123 deletions

View File

@@ -21,15 +21,15 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
public function testDefaultFormat()
{
$wildfire = new WildfireFormatter();
$record = array(
$record = [
'level' => Logger::ERROR,
'level_name' => 'ERROR',
'channel' => 'meh',
'context' => array('from' => 'logger'),
'context' => ['from' => 'logger'],
'datetime' => new \DateTimeImmutable("@0"),
'extra' => array('ip' => '127.0.0.1'),
'extra' => ['ip' => '127.0.0.1'],
'message' => 'log',
);
];
$message = $wildfire->format($record);
@@ -46,15 +46,15 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
public function testFormatWithFileAndLine()
{
$wildfire = new WildfireFormatter();
$record = array(
$record = [
'level' => Logger::ERROR,
'level_name' => 'ERROR',
'channel' => 'meh',
'context' => array('from' => 'logger'),
'context' => ['from' => 'logger'],
'datetime' => new \DateTimeImmutable("@0"),
'extra' => array('ip' => '127.0.0.1', 'file' => 'test', 'line' => 14),
'extra' => ['ip' => '127.0.0.1', 'file' => 'test', 'line' => 14],
'message' => 'log',
);
];
$message = $wildfire->format($record);
@@ -71,15 +71,15 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
public function testFormatWithoutContext()
{
$wildfire = new WildfireFormatter();
$record = array(
$record = [
'level' => Logger::ERROR,
'level_name' => 'ERROR',
'channel' => 'meh',
'context' => array(),
'context' => [],
'datetime' => new \DateTimeImmutable("@0"),
'extra' => array(),
'extra' => [],
'message' => 'log',
);
];
$message = $wildfire->format($record);
@@ -96,17 +96,17 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
public function testBatchFormatThrowException()
{
$wildfire = new WildfireFormatter();
$record = array(
$record = [
'level' => Logger::ERROR,
'level_name' => 'ERROR',
'channel' => 'meh',
'context' => array(),
'context' => [],
'datetime' => new \DateTimeImmutable("@0"),
'extra' => array(),
'extra' => [],
'message' => 'log',
);
];
$wildfire->formatBatch(array($record));
$wildfire->formatBatch([$record]);
}
/**
@@ -115,22 +115,22 @@ class WildfireFormatterTest extends \PHPUnit_Framework_TestCase
public function testTableFormat()
{
$wildfire = new WildfireFormatter();
$record = array(
$record = [
'level' => Logger::ERROR,
'level_name' => 'ERROR',
'channel' => 'table-channel',
'context' => array(
WildfireFormatter::TABLE => array(
array('col1', 'col2', 'col3'),
array('val1', 'val2', 'val3'),
array('foo1', 'foo2', 'foo3'),
array('bar1', 'bar2', 'bar3'),
),
),
'context' => [
WildfireFormatter::TABLE => [
['col1', 'col2', 'col3'],
['val1', 'val2', 'val3'],
['foo1', 'foo2', 'foo3'],
['bar1', 'bar2', 'bar3'],
],
],
'datetime' => new \DateTimeImmutable("@0"),
'extra' => array(),
'extra' => [],
'message' => 'table-message',
);
];
$message = $wildfire->format($record);