summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2025-10-14 20:51:37 +0200
committerjvoisin2025-10-14 20:51:37 +0200
commitf06cafcfbced1af4978fbaf7f74f9c4f8045e0c5 (patch)
tree8d6445ed011d1573f5e587b5fb9c92da8785890c
parentda8c7aebc5602c04b771ada71a098ccb23d83a48 (diff)
Add a test
-rw-r--r--src/tests/phplog_catch.phpt21
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--
2Check if error handling doesn't eat SP errors
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/phplog.ini
7--FILE--
8<?php
9set_exception_handler(function ($exception) {
10 die('handler: fail');
11});
12try {
13 var_dump(unserialize('s:1:"a";'));
14} catch(Exception $e) {
15 die("catch: fail");
16}
17die("after: fail")
18?>
19--EXPECTF--
20Fatal error: [snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. in %s/tests/phplog_catch.php on line %d
21