diff options
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/config/phplog_max_len.ini | 2 | ||||
| -rw-r--r-- | src/tests/phplog_max_len.phpt | 14 |
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 @@ | |||
| 1 | sp.disable_function.function("ini_set").param("option").value("1234567890abcdefghijklmnopqrstuvwxyz").drop(); | ||
| 2 | sp.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-- | ||
| 2 | Check 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-- | ||
| 7 | sp.configuration_file={PWD}/config/phplog_max_len.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | var_dump(ini_set("1234567890abcdefghijklmnopqrstuvwxyz", "value")); | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | Fatal 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 | |||
