mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-29 07:50:05 +02:00
CS fixes
This commit is contained in:
@@ -125,21 +125,22 @@ class JsonFormatterTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param JsonFormatter $formatter
|
||||
* @param JsonFormatter $formatter
|
||||
* @param \Exception|\Throwable $exception
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function formatRecordWithExceptionInContext(JsonFormatter $formatter, $exception)
|
||||
{
|
||||
$message = $formatter->format(array(
|
||||
$message = $formatter->format([
|
||||
'level_name' => 'CRITICAL',
|
||||
'channel' => 'core',
|
||||
'context' => array('exception' => $exception),
|
||||
'context' => ['exception' => $exception],
|
||||
'datetime' => null,
|
||||
'extra' => array(),
|
||||
'extra' => [],
|
||||
'message' => 'foobar',
|
||||
));
|
||||
]);
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
@@ -93,14 +93,14 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$formatter = new NormalizerFormatter('Y-m-d');
|
||||
$e = new \SoapFault('foo', 'bar', 'hello', 'world');
|
||||
$formatted = $formatter->format(array(
|
||||
$formatted = $formatter->format([
|
||||
'exception' => $e,
|
||||
));
|
||||
]);
|
||||
|
||||
unset($formatted['exception']['trace']);
|
||||
|
||||
$this->assertEquals(array(
|
||||
'exception' => array(
|
||||
$this->assertEquals([
|
||||
'exception' => [
|
||||
'class' => 'SoapFault',
|
||||
'message' => 'bar',
|
||||
'code' => 0,
|
||||
@@ -108,8 +108,8 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'faultcode' => 'foo',
|
||||
'faultactor' => 'hello',
|
||||
'detail' => 'world',
|
||||
),
|
||||
), $formatted);
|
||||
],
|
||||
], $formatted);
|
||||
}
|
||||
|
||||
public function testFormatToStringExceptionHandle()
|
||||
|
Reference in New Issue
Block a user