1--TEST--
2stream_resolve_include_path(string path)
3--FILE--
4<?php
5$include_path = __DIR__ . '/test_path';
6$include_path_nested = $include_path . '/nested';
7
8$include_path_file = $include_path . DIRECTORY_SEPARATOR . 'file';
9$include_path_nested_file = $include_path_nested . DIRECTORY_SEPARATOR . 'file';
10
11mkdir($include_path);
12mkdir($include_path_nested);
13
14file_put_contents($include_path_file, 'include_path');
15file_put_contents($include_path_nested_file, 'include_path');
16
17var_dump(stream_resolve_include_path());
18
19set_include_path($include_path . PATH_SEPARATOR . $include_path_nested);
20var_dump(stream_resolve_include_path('file-does-not-exist'));
21
22set_include_path($include_path . PATH_SEPARATOR . $include_path_nested);
23var_dump(stream_resolve_include_path('file'));
24set_include_path($include_path_nested . PATH_SEPARATOR . $include_path);
25var_dump(stream_resolve_include_path('file'));
26
27unlink($include_path_nested_file);
28rmdir($include_path_nested);
29unlink($include_path_file);
30rmdir($include_path);
31--EXPECTF--
32Warning: stream_resolve_include_path() expects exactly 1 parameter, 0 given in %s on line %d
33NULL
34bool(false)
35string(%d) "%stest_path%sfile"
36string(%d) "%stest_path%snested%sfile"
37
38