From e79f7e3bd992c7f0915ef9afe7afb6d79740527a Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 14 Jan 2019 19:29:25 +0000 Subject: Reorganize the testsuite Splitting the testsuite in several components makes it easier to manage and comprehend. This was also needed some some tests aren't passing on Alpine Linux, but we still want to run as many of them as we can on this platform.--- .../config/config_stream_wrapper.ini | 1 + .../config/config_stream_wrapper_register.ini | 1 + src/tests/stream_wrapper/stream_wrapper.phpt | 31 ++++++++++++++++++++++ .../stream_wrapper/stream_wrapper_register.phpt | 25 +++++++++++++++++ .../stream_wrapper/stream_wrapper_restore.phpt | 17 ++++++++++++ 5 files changed, 75 insertions(+) create mode 100644 src/tests/stream_wrapper/config/config_stream_wrapper.ini create mode 100644 src/tests/stream_wrapper/config/config_stream_wrapper_register.ini create mode 100644 src/tests/stream_wrapper/stream_wrapper.phpt create mode 100644 src/tests/stream_wrapper/stream_wrapper_register.phpt create mode 100644 src/tests/stream_wrapper/stream_wrapper_restore.phpt (limited to 'src/tests/stream_wrapper') diff --git a/src/tests/stream_wrapper/config/config_stream_wrapper.ini b/src/tests/stream_wrapper/config/config_stream_wrapper.ini new file mode 100644 index 0000000..0cd7f77 --- /dev/null +++ b/src/tests/stream_wrapper/config/config_stream_wrapper.ini @@ -0,0 +1 @@ +sp.wrappers_whitelist.list("https,FTP,does_not_exist"); diff --git a/src/tests/stream_wrapper/config/config_stream_wrapper_register.ini b/src/tests/stream_wrapper/config/config_stream_wrapper_register.ini new file mode 100644 index 0000000..ee273a1 --- /dev/null +++ b/src/tests/stream_wrapper/config/config_stream_wrapper_register.ini @@ -0,0 +1 @@ +sp.wrappers_whitelist.list("php,lelel"); diff --git a/src/tests/stream_wrapper/stream_wrapper.phpt b/src/tests/stream_wrapper/stream_wrapper.phpt new file mode 100644 index 0000000..fdea50c --- /dev/null +++ b/src/tests/stream_wrapper/stream_wrapper.phpt @@ -0,0 +1,31 @@ +--TEST-- +Stream wrapper +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/config_stream_wrapper.ini +--FILE-- + +--EXPECTF-- +Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0 + +Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0 + +Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0 + +Warning: file_get_contents(): Unable to find the wrapper "http" - did you forget to enable it when you configured PHP? in %a/stream_wrapper.php on line %d + +Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: %s + +Warning: file_get_contents(https://qweqwezxc): failed to open stream: php_network_getaddresses: getaddrinfo failed: %s + +Warning: file_get_contents(ftp://qweqwezxc): failed to open stream: operation failed in %a/stream_wrapper.php on line %d + +Warning: file_get_contents(): Unable to find the wrapper "lelel" - did you forget to enable it when you configured PHP? in %a/stream_wrapper.php on line %d + +Warning: file_get_contents(lelel://qweqwezxc): failed to open stream: No such file or directory in %a/stream_wrapper.php on line %d diff --git a/src/tests/stream_wrapper/stream_wrapper_register.phpt b/src/tests/stream_wrapper/stream_wrapper_register.phpt new file mode 100644 index 0000000..39514e9 --- /dev/null +++ b/src/tests/stream_wrapper/stream_wrapper_register.phpt @@ -0,0 +1,25 @@ +--TEST-- +Stream wrapper +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini +--FILE-- + +--EXPECTF-- +Warning: fopen(): Unable to find the wrapper "lolol" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_register.php on line %d + +Warning: fopen(): file:// wrapper is disabled in the server configuration in %a/stream_wrapper_register.php on line %d + +Warning: fopen(lolol://asdasd): failed to open stream: no suitable wrapper could be found in %a/stream_wrapper_register.php on line %d diff --git a/src/tests/stream_wrapper/stream_wrapper_restore.phpt b/src/tests/stream_wrapper/stream_wrapper_restore.phpt new file mode 100644 index 0000000..b4a29c8 --- /dev/null +++ b/src/tests/stream_wrapper/stream_wrapper_restore.phpt @@ -0,0 +1,17 @@ +--TEST-- +Stream wrapper +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini +--FILE-- + +--EXPECTF-- +Notice: stream_wrapper_restore(): file:// was never changed, nothing to restore in %a/stream_wrapper_restore.php on line %d + +Warning: fopen(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_restore.php on line %d + +Warning: fopen(file://asdasd): failed to open stream: No such file or directory in %a/stream_wrapper_restore.php on line %d -- cgit v1.3