diff options
Diffstat (limited to 'src/tests/stream_wrapper/stream_wrapper_register_php82.phpt')
| -rw-r--r-- | src/tests/stream_wrapper/stream_wrapper_register_php82.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tests/stream_wrapper/stream_wrapper_register_php82.phpt b/src/tests/stream_wrapper/stream_wrapper_register_php82.phpt new file mode 100644 index 0000000..b03a2f1 --- /dev/null +++ b/src/tests/stream_wrapper/stream_wrapper_register_php82.phpt | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | --TEST-- | ||
| 2 | Stream wrapper on PHP8.2+ | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80200) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | class qwe { | ||
| 11 | function stream_open($fname) { | ||
| 12 | return $fname; | ||
| 13 | } | ||
| 14 | } | ||
| 15 | |||
| 16 | stream_wrapper_register("lelel", "qwe"); | ||
| 17 | stream_wrapper_register("lolol", "qwe"); | ||
| 18 | fopen("lelel://asdasd", "r"); | ||
| 19 | fopen("lolol://asdasd", "r"); | ||
| 20 | ?> | ||
| 21 | --EXPECTF-- | ||
| 22 | Deprecated: Creation of dynamic property qwe::$context is deprecated in %s/tests/stream_wrapper/stream_wrapper_register_php82.php on line %d | ||
| 23 | |||
| 24 | Warning: fopen(): Unable to find the wrapper "lolol" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_register_php82.php on line %d | ||
| 25 | |||
| 26 | Warning: fopen(): file:// wrapper is disabled in the server configuration in %a/stream_wrapper_register_php82.php on line %d | ||
| 27 | |||
| 28 | Warning: fopen(lolol://asdasd): %s to open stream: no suitable wrapper could be found in %a/stream_wrapper_register_php82.php on line %d | ||
