xref: /PHP-5.4/ext/phar/tests/include_path.phpt (revision 16b4d8e0)
1--TEST--
2Phar: include_path with phar:// wrapper
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5--INI--
6phar.readonly=0
7--FILE--
8<?php
9$fname = dirname(__FILE__) . '/tempmanifest1.phar.php';
10$a = new Phar($fname);
11$a['file1.php'] = 'file1.php
12';
13$a['test/file1.php'] = 'test/file1.php
14';
15unset($a);
16set_include_path('.' . PATH_SEPARATOR . 'phar://' . $fname);
17include 'file1.php';
18set_include_path('.' . PATH_SEPARATOR . 'phar://' . $fname . '/test');
19include 'file1.php';
20include 'file2.php';
21?>
22===DONE===
23--CLEAN--
24<?php
25@unlink(dirname(__FILE__) . '/tempmanifest1.phar.php');
26?>
27--EXPECTF--
28file1.php
29test/file1.php
30
31Warning: include(file2.php): failed to open stream: No such file or directory in %sinclude_path.php on line %d
32
33Warning: include(): Failed opening 'file2.php' for inclusion (include_path='%sphar://%stempmanifest1.phar.php/test') in %sinclude_path.php on line %d
34===DONE===