mirror of
https://github.com/Seldaek/monolog.git
synced 2025-07-31 18:30:15 +02:00
CS fixes
This commit is contained in:
@@ -30,24 +30,24 @@ class ElasticaFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
public function testFormat()
|
||||
{
|
||||
// test log message
|
||||
$msg = array(
|
||||
$msg = [
|
||||
'level' => Logger::ERROR,
|
||||
'level_name' => 'ERROR',
|
||||
'channel' => 'meh',
|
||||
'context' => array('foo' => 7, 'bar', 'class' => new \stdClass),
|
||||
'context' => ['foo' => 7, 'bar', 'class' => new \stdClass],
|
||||
'datetime' => new \DateTimeImmutable("@0"),
|
||||
'extra' => array(),
|
||||
'extra' => [],
|
||||
'message' => 'log',
|
||||
);
|
||||
];
|
||||
|
||||
// expected values
|
||||
$expected = $msg;
|
||||
$expected['datetime'] = '1970-01-01T00:00:00.000000+00:00';
|
||||
$expected['context'] = array(
|
||||
$expected['context'] = [
|
||||
'class' => ['stdClass' => []],
|
||||
'foo' => 7,
|
||||
0 => 'bar',
|
||||
);
|
||||
];
|
||||
|
||||
// format log message
|
||||
$formatter = new ElasticaFormatter('my_index', 'doc_type');
|
||||
|
Reference in New Issue
Block a user