diff options
| author | Ben Fuhrmannek | 2021-08-07 15:57:30 +0200 |
|---|---|---|
| committer | Ben Fuhrmannek | 2021-08-07 15:57:30 +0200 |
| commit | 5fbb1733f67172e4111fa512961106f4733395db (patch) | |
| tree | 56ea902e1e3dab7b3f105e1e11d79d58ba870381 /src/tests/ini/ini_regexp.phpt | |
| parent | bd8b5bb241ca359b65c1a3717c9905d034b9703b (diff) | |
unit tests for ini protection feature
Diffstat (limited to 'src/tests/ini/ini_regexp.phpt')
| -rw-r--r-- | src/tests/ini/ini_regexp.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tests/ini/ini_regexp.phpt b/src/tests/ini/ini_regexp.phpt new file mode 100644 index 0000000..f6c5198 --- /dev/null +++ b/src/tests/ini/ini_regexp.phpt | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | --TEST-- | ||
| 2 | INI protection .regexp() | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print("skip"); ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/sp.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | ini_set("highlight.comment", "#000aBc"); | ||
| 10 | var_dump(ini_get("highlight.comment")); | ||
| 11 | |||
| 12 | ini_set("highlight.comment", "xxx"); | ||
| 13 | var_dump(ini_get("highlight.comment")); | ||
| 14 | ?> | ||
| 15 | --EXPECTF-- | ||
| 16 | string(7) "#000aBc" | ||
| 17 | |||
| 18 | Warning: [snuffleupagus][0.0.0.0][ini_protection][log] INI value does not match regex in %a/ini_regexp.php on line 5 | ||
| 19 | string(7) "#000aBc" | ||
