summaryrefslogtreecommitdiff
path: root/src/tests/stream_wrapper/stream_wrapper_register.phpt
blob: 3c63d4fead3dd1a62f068be3e25594d3d1176f49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
Stream wrapper
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80200) print "skip Not applicable for PHP 8+"; ?>
--INI--
sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini
--FILE--
<?php 
class qwe {
  function stream_open($fname) {
    return $fname;
  }
}

stream_wrapper_register("lelel", "qwe");
stream_wrapper_register("lolol", "qwe");
fopen("lelel://asdasd", "r");
fopen("lolol://asdasd", "r");
?>
--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): %s to open stream: no suitable wrapper could be found in %a/stream_wrapper_register.php on line %d