mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-16 01:54:19 +02:00
CI fixes
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
namespace Monolog\Formatter;
|
||||
|
||||
use Monolog\Level;
|
||||
use Monolog\LogRecord;
|
||||
use Monolog\Test\TestCase;
|
||||
|
||||
class ElasticaFormatterTest extends TestCase
|
||||
|
@@ -219,7 +219,7 @@ class GelfMessageFormatterTest extends TestCase
|
||||
$length = 200;
|
||||
|
||||
foreach ($messageArray as $key => $value) {
|
||||
if (!in_array($key, array('level', 'timestamp'))) {
|
||||
if (!in_array($key, ['level', 'timestamp'])) {
|
||||
$length += strlen($value);
|
||||
}
|
||||
}
|
||||
|
@@ -205,9 +205,6 @@ class JsonFormatterTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param JsonFormatter $formatter
|
||||
* @param \Throwable $exception
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function formatRecordWithExceptionInContext(JsonFormatter $formatter, \Throwable $exception)
|
||||
@@ -265,7 +262,7 @@ class JsonFormatterTest extends TestCase
|
||||
Level::Critical,
|
||||
'bar',
|
||||
channel: 'test',
|
||||
context: array($largeArray),
|
||||
context: [$largeArray],
|
||||
));
|
||||
|
||||
$this->assertCount(1000, $res['context'][0]);
|
||||
@@ -281,7 +278,7 @@ class JsonFormatterTest extends TestCase
|
||||
Level::Critical,
|
||||
'bar',
|
||||
channel: 'test',
|
||||
context: array($largeArray),
|
||||
context: [$largeArray],
|
||||
));
|
||||
|
||||
$this->assertCount(1001, $res['context'][0]);
|
||||
|
@@ -274,6 +274,5 @@ class MongoDBFormatterTest extends TestCase
|
||||
$this->assertInstanceOf(ObjectId::class, $formattedRecord['context']['objectid']);
|
||||
$this->assertInstanceOf(UTCDateTime::class, $formattedRecord['context']['nest']['timestamp']);
|
||||
$this->assertInstanceOf(Regex::class, $formattedRecord['context']['nest']['regex']);
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -338,7 +338,7 @@ class NormalizerFormatterTest extends TestCase
|
||||
'message' => 'Foo',
|
||||
'code' => 0,
|
||||
]],
|
||||
"..." => "Over 2 items (7 total), aborting normalization"
|
||||
"..." => "Over 2 items (7 total), aborting normalization",
|
||||
],
|
||||
$message
|
||||
);
|
||||
@@ -372,9 +372,6 @@ class NormalizerFormatterTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param NormalizerFormatter $formatter
|
||||
* @param \Throwable $exception
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function formatRecordWithExceptionInContext(NormalizerFormatter $formatter, \Throwable $exception)
|
||||
@@ -393,7 +390,7 @@ class NormalizerFormatterTest extends TestCase
|
||||
{
|
||||
try {
|
||||
$arg = new TestInfoLeak;
|
||||
call_user_func(array($this, 'throwHelper'), $arg, $dt = new \DateTime());
|
||||
call_user_func([$this, 'throwHelper'], $arg, $dt = new \DateTime());
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
|
||||
|
@@ -95,7 +95,7 @@ class ScalarFormatterTest extends TestCase
|
||||
'code' => $exception->getCode(),
|
||||
'file' => $exception->getFile() . ':' . $exception->getLine(),
|
||||
'trace' => $this->buildTrace($exception),
|
||||
]
|
||||
],
|
||||
]), $formatted['context']);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user