Annotation of embedaddon/php/ext/phar/tests/cached_manifest_1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar: phar.cache_list basic read test
3: --SKIPIF--
4: <?php
5: if (!extension_loaded("phar")) die("skip");
6: if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
7: ?>
8: --INI--
9: phar.cache_list={PWD}/files/nophar.phar
10: --FILE--
11: <?php
12: $pname = 'phar://' . dirname(__FILE__) . '/files/nophar.phar';
13: var_dump(file_get_contents($pname . '/b/c.php'));
14: $a = opendir($pname);
15: while (false !== ($b = readdir($a))) {
16: var_dump($b);
17: }
18: foreach (new RecursiveIteratorIterator(new Phar($pname)) as $f) {
19: var_dump($f->getPathName());
20: }
21: var_dump(is_dir($pname . '/b'));
22: var_dump(is_dir($pname . '/d'));
23: var_dump(is_dir($pname . '/b/c.php'));
24: ?>
25: ===DONE===
26: --EXPECTF--
27: string(131) "<?php echo "in b\n";$a = fopen("index.php", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";"
28: string(1) "b"
29: string(1) "d"
30: string(9) "index.php"
31: string(7) "web.php"
32: string(%d) "phar://%snophar.phar/b%cc.php"
33: string(%d) "phar://%snophar.phar%cd"
34: string(%d) "phar://%snophar.phar%cindex.php"
35: string(%d) "phar://%snophar.phar%cweb.php"
36: bool(true)
37: bool(false)
38: bool(false)
39: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>