diff options
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/phplog_catch.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/phplog_catch.phpt b/src/tests/phplog_catch.phpt new file mode 100644 index 0000000..5b8d4f5 --- /dev/null +++ b/src/tests/phplog_catch.phpt | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | --TEST-- | ||
| 2 | Check if error handling doesn't eat SP errors | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/phplog.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | set_exception_handler(function ($exception) { | ||
| 10 | die('handler: fail'); | ||
| 11 | }); | ||
| 12 | try { | ||
| 13 | var_dump(unserialize('s:1:"a";')); | ||
| 14 | } catch(Exception $e) { | ||
| 15 | die("catch: fail"); | ||
| 16 | } | ||
| 17 | die("after: fail") | ||
| 18 | ?> | ||
| 19 | --EXPECTF-- | ||
| 20 | Fatal error: [snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. in %s/tests/phplog_catch.php on line %d | ||
| 21 | |||
