mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-17 18:36:32 +02:00
@@ -92,7 +92,7 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
$formatter = new NormalizerFormatter('Y-m-d');
|
||||
$e = new \SoapFault('foo', 'bar', 'hello', (object) array('foo' => 'world'));
|
||||
$e = new \SoapFault('foo', 'bar', 'hello', 'world');
|
||||
$formatted = $formatter->format(array(
|
||||
'exception' => $e,
|
||||
));
|
||||
@@ -110,6 +110,26 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
'detail' => 'world',
|
||||
),
|
||||
), $formatted);
|
||||
|
||||
$formatter = new NormalizerFormatter('Y-m-d');
|
||||
$e = new \SoapFault('foo', 'bar', 'hello', (object) ['bar' => (object) ['biz' => 'baz'], 'foo' => 'world']);
|
||||
$formatted = $formatter->format([
|
||||
'exception' => $e,
|
||||
]);
|
||||
|
||||
unset($formatted['exception']['trace']);
|
||||
|
||||
$this->assertEquals([
|
||||
'exception' => [
|
||||
'class' => 'SoapFault',
|
||||
'message' => 'bar',
|
||||
'code' => 0,
|
||||
'file' => $e->getFile().':'.$e->getLine(),
|
||||
'faultcode' => 'foo',
|
||||
'faultactor' => 'hello',
|
||||
'detail' => '{"bar":{"biz":"baz"},"foo":"world"}',
|
||||
],
|
||||
], $formatted);
|
||||
}
|
||||
|
||||
public function testFormatToStringExceptionHandle()
|
||||
|
Reference in New Issue
Block a user