Annotation of embedaddon/php/ext/phar/tests/018.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar: opendir test, root directory
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.require_hash=0
10: --FILE--
11: <?php
12: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
13: $pname = 'phar://' . $fname;
14: $file = "<?php
15: Phar::mapPhar('hio');
16: __HALT_COMPILER(); ?>";
17:
18: $files = array();
19: $files['a'] = 'a';
20: $files['b/a'] = 'b';
21: include 'files/phar_test.inc';
22:
23: include $fname;
24: $dir = opendir('phar://hio/');
25: while (false !== ($a = readdir($dir))) {
26: var_dump($a);
27: var_dump(is_dir('phar://hio/' . $a));
28: }
29: ?>
30: --CLEAN--
31: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
32: --EXPECT--
33: string(1) "a"
34: bool(false)
35: string(1) "b"
36: bool(true)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>