1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-16 01:54:19 +02:00
This commit is contained in:
Jordi Boggiano
2022-04-19 22:10:02 +02:00
parent e4bb5c5cf3
commit 2695fa86cd
85 changed files with 350 additions and 398 deletions

View File

@@ -12,7 +12,6 @@
namespace Monolog\Formatter;
use Monolog\Level;
use Monolog\LogRecord;
use Monolog\Test\TestCase;
class ElasticaFormatterTest extends TestCase

View File

@@ -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);
}
}

View File

@@ -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]);

View File

@@ -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']);
}
}

View File

@@ -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) {
}

View File

@@ -95,7 +95,7 @@ class ScalarFormatterTest extends TestCase
'code' => $exception->getCode(),
'file' => $exception->getFile() . ':' . $exception->getLine(),
'trace' => $this->buildTrace($exception),
]
],
]), $formatted['context']);
}
}