Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
147 changed files
with
1,324 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf2.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
19 changes: 19 additions & 0 deletions
19
src/tests/broken_configuration_php8/broken_conf_allow_broken_disabled.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--TEST-- | ||
Broken configuration with allow broken turned off | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf.ini | ||
sp.allow_broken_configuration=Off | ||
--FILE-- | ||
<?php | ||
echo 1337; | ||
?> | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
17 changes: 17 additions & 0 deletions
17
src/tests/broken_configuration_php8/broken_conf_allow_broken_enabled.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--TEST-- | ||
Broken configuration with allow broken turned on | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf.ini | ||
sp.allow_broken_configuration=On | ||
--FILE-- | ||
<?php | ||
echo 1337; | ||
?> | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | ||
1337 |
18 changes: 18 additions & 0 deletions
18
src/tests/broken_configuration_php8/broken_conf_config_regexp.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--TEST-- | ||
Broken configuration | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_config_regexp.ini | ||
--FILE-- | ||
--EXPECTF-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
18 changes: 18 additions & 0 deletions
18
src/tests/broken_configuration_php8/broken_conf_config_regexp_no_closing_paren.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--TEST-- | ||
Broken configuration - regexp without a closing parenthesis | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
...tests/broken_configuration_php8/broken_conf_cookie_encryption_without_encryption_key.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration - encrypted cookie without encryption key | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_encryption_key.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_env_var.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration - encrypted cookie with without cookie env var | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_env_var.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_cookie_name_and_regexp.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration - encrypted cookie with name and regexp | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_enable_disable.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Global strict mode | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini | ||
--FILE-- | ||
--EXPECTF-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration for eval | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_eval.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_expecting_bool.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Bad boolean value in configuration | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_invalid_cidr.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_invalid_cidr6.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_no_slash.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration, invalid cidr for ipv6 because there is no `/` in it | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
9 changes: 9 additions & 0 deletions
9
src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_too_big.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--TEST-- | ||
Broken configuration, cidr for ipv6 is too big, that will `mod` to 25. | ||
(13337%128 = 25) | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_too_big.ini | ||
--FILE-- | ||
--EXPECT-- |
19 changes: 19 additions & 0 deletions
19
src/tests/broken_configuration_php8/broken_conf_invalid_cidr_value.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--TEST-- | ||
Broken configuration, invalid cidr value | ||
(13337%128 = 25) | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_invalid_filename.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration filename without absolute path | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini | ||
--FILE-- | ||
--EXPECTF-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_invalid_log_media.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration filename with improper log media | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini | ||
--FILE-- | ||
--EXPECTF-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_invalid_type.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken conf with wrong type | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini | ||
--FILE-- | ||
--EXPECTF-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_key_value.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Broken configuration | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_key_value.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_line_empty_string.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Configuration line with an empty string | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
15 changes: 15 additions & 0 deletions
15
src/tests/broken_configuration_php8/broken_conf_line_no_closing.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Configuration line without closing parenthese | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
18 changes: 18 additions & 0 deletions
18
src/tests/broken_configuration_php8/broken_conf_local_var_1.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--TEST-- | ||
Broken configuration | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini | ||
--FILE-- | ||
--EXPECT-- | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 | ||
|
||
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
Could not startup. |
Oops, something went wrong.