diff options
| author | jvoisin | 2020-12-31 15:11:56 +0100 |
|---|---|---|
| committer | jvoisin | 2020-12-31 15:12:20 +0100 |
| commit | c3a35b46107fc5ddf94b15ccd6a4d1697610e48f (patch) | |
| tree | cf2e7e6abbbe2b9ce7368c9144cd72b13d94ed6b /src/tests | |
| parent | 3934044e873a24ac7a89014c1ad79e585d6a1148 (diff) | |
Add two tests for inexistant config files
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/php8/inexistent_conf_file.phpt | 14 | ||||
| -rw-r--r-- | src/tests/php8/inexistent_conf_file_list.phpt | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/tests/php8/inexistent_conf_file.phpt b/src/tests/php8/inexistent_conf_file.phpt new file mode 100644 index 0000000..ac763aa --- /dev/null +++ b/src/tests/php8/inexistent_conf_file.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Test for unexistent configuration file, in php8 | ||
| 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/unexistent_configuration_file.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php ?> | ||
| 10 | --EXPECTF-- | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/php8/inexistent_conf_file_list.phpt b/src/tests/php8/inexistent_conf_file_list.phpt new file mode 100644 index 0000000..2309fc6 --- /dev/null +++ b/src/tests/php8/inexistent_conf_file_list.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Non-existent configuration file in a list in php8 | ||
| 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/default.rules,{PWD}/non_existent_configuration_file | ||
| 8 | --FILE-- | ||
| 9 | <?php ?> | ||
| 10 | --EXPECTF-- | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
