Annotation of embedaddon/php/ext/phar/tests/include_path.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Phar: include_path with phar:// wrapper
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("phar")) die("skip"); ?>
                      5: --INI--
                      6: phar.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: ';
                     15: unset($a);
                     16: set_include_path('.' . PATH_SEPARATOR . 'phar://' . $fname);
                     17: include 'file1.php';
                     18: set_include_path('.' . PATH_SEPARATOR . 'phar://' . $fname . '/test');
                     19: include 'file1.php';
                     20: include 'file2.php';
                     21: ?>
                     22: ===DONE===
                     23: --CLEAN--
                     24: <?php
                     25: @unlink(dirname(__FILE__) . '/tempmanifest1.phar.php');
                     26: ?>
                     27: --EXPECTF--
                     28: file1.php
                     29: test/file1.php
                     30: 
                     31: Warning: include(file2.php): failed to open stream: No such file or directory in %sinclude_path.php on line %d
                     32: 
                     33: Warning: include(): Failed opening 'file2.php' for inclusion (include_path='%sphar://%stempmanifest1.phar.php/test') in %sinclude_path.php on line %d
                     34: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>