mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-20 11:51:32 +02:00
Added informations to normalize a SoapFault
This commit is contained in:
@@ -85,6 +85,29 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
), $formatted);
|
||||
}
|
||||
|
||||
public function testFormatSoapFaultException()
|
||||
{
|
||||
$formatter = new NormalizerFormatter('Y-m-d');
|
||||
$e = new \SoapFault('foo', 'bar', 'hello', 'world');
|
||||
$formatted = $formatter->format(array(
|
||||
'exception' => $e,
|
||||
));
|
||||
|
||||
unset($formatted['exception']['trace']);
|
||||
|
||||
$this->assertEquals(array(
|
||||
'exception' => array(
|
||||
'class' => 'SoapFault',
|
||||
'message' => 'bar',
|
||||
'code' => 0,
|
||||
'file' => $e->getFile().':'.$e->getLine(),
|
||||
'faultcode' => 'foo',
|
||||
'faultactor' => 'hello',
|
||||
'detail' => 'world',
|
||||
),
|
||||
), $formatted);
|
||||
}
|
||||
|
||||
public function testFormatToStringExceptionHandle()
|
||||
{
|
||||
$formatter = new NormalizerFormatter('Y-m-d');
|
||||
|
Reference in New Issue
Block a user