diff options
author | Jordi Boggiano <j.boggiano@seld.be> | 2016-07-29 04:53:49 +0200 |
---|---|---|
committer | Jordi Boggiano <j.boggiano@seld.be> | 2016-07-29 04:53:49 +0200 |
commit | 6b0d0c4a195f5f9cf65a38aad6e39a860f62f52e (patch) | |
tree | 1267a1e4f47b40b8d673c59125e55090525b7660 /tests/Monolog/Formatter/NormalizerFormatterTest.php | |
parent | 20e09c7e5f303e533fd98e21e971cf78c15626cf (diff) | |
parent | ced92841236ac0cd3677579002916dd343647166 (diff) | |
download | monolog-6b0d0c4a195f5f9cf65a38aad6e39a860f62f52e.zip monolog-6b0d0c4a195f5f9cf65a38aad6e39a860f62f52e.tar.gz monolog-6b0d0c4a195f5f9cf65a38aad6e39a860f62f52e.tar.bz2 |
Merge branch '1.x'
Diffstat (limited to 'tests/Monolog/Formatter/NormalizerFormatterTest.php')
-rw-r--r-- | tests/Monolog/Formatter/NormalizerFormatterTest.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/Monolog/Formatter/NormalizerFormatterTest.php b/tests/Monolog/Formatter/NormalizerFormatterTest.php index 2b2d7c7..6cb53ef 100644 --- a/tests/Monolog/Formatter/NormalizerFormatterTest.php +++ b/tests/Monolog/Formatter/NormalizerFormatterTest.php @@ -85,6 +85,33 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase ], $formatted); } + public function testFormatSoapFaultException() + { + if (!class_exists('SoapFault')) { + $this->markTestSkipped('Requires the soap extension'); + } + + $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'); |