summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorjvoisin2023-01-31 20:16:21 +0100
committerjvoisin2023-01-31 20:25:14 +0100
commit78e451eaf99e8f239867def2d8220dfa348cc167 (patch)
treedcd1f1964634919bd0b9784d3546fd3690f389a1 /src/tests
parent26f9987a538dc68d5a825b1712d3456a2d7aa109 (diff)
Add sp.log_max_len
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/config/phplog_max_len.ini2
-rw-r--r--src/tests/phplog_max_len.phpt14
2 files changed, 16 insertions, 0 deletions
diff --git a/src/tests/config/phplog_max_len.ini b/src/tests/config/phplog_max_len.ini
new file mode 100644
index 0000000..3465d17
--- /dev/null
+++ b/src/tests/config/phplog_max_len.ini
@@ -0,0 +1,2 @@
1sp.disable_function.function("ini_set").param("option").value("1234567890abcdefghijklmnopqrstuvwxyz").drop();
2sp.log_max_len("16");
diff --git a/src/tests/phplog_max_len.phpt b/src/tests/phplog_max_len.phpt
new file mode 100644
index 0000000..6294f4e
--- /dev/null
+++ b/src/tests/phplog_max_len.phpt
@@ -0,0 +1,14 @@
1--TEST--
2Check the phplog output with a log_max_len
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
5<?php if (PHP_VERSION_ID < 80000) print "skip"; ?>
6--INI--
7sp.configuration_file={PWD}/config/phplog_max_len.ini
8--FILE--
9<?php
10var_dump(ini_set("1234567890abcdefghijklmnopqrstuvwxyz", "value"));
11?>
12--EXPECTF--
13Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'ini_set', because its argument '$option' content (1234567890abcdef) matched a rule in %s/tests/phplog_max_len.php on line 2
14