Annotation of embedaddon/php/ext/phar/tests/phar_oo_005U.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar and RecursiveDirectoryIterator
3: --SKIPIF--
4: <?php
5: if (!extension_loaded("phar")) die("skip");
6: if (!extension_loaded("spl")) die("skip SPL not available");
7: if (version_compare(PHP_VERSION, "6.0", "<")) die("skip requires Unicode support");
8: ?>
9: --INI--
10: phar.require_hash=0
11: --FILE--
12: <?php
13:
14: require_once 'files/phar_oo_test.inc';
15: $fname = str_replace('\\', '/', $fname);
16:
17: $it = new RecursiveDirectoryIterator('phar://'.$fname);
18: $it = new RecursiveIteratorIterator($it);
19:
20: foreach($it as $name => $ent)
21: {
22: var_dump(str_replace(array('\\', $fname), array('/', '*'), $name));
23: var_dump(str_replace(array('\\', $fname), array('/', '*'), $ent->getPathname()));
24: var_dump(str_replace('\\', '/', $it->getSubPath()));
25: var_dump(str_replace('\\', '/', $it->getSubPathName()));
26: $sub = $it->getPathInfo();
27: var_dump(str_replace('\\', '/', $sub->getFilename()));
28: }
29:
30: ?>
31: ===DONE===
32: --CLEAN--
33: <?php
34: unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
35: __halt_compiler();
36: ?>
37: --EXPECT--
38: unicode(14) "phar://*/a.php"
39: unicode(14) "phar://*/a.php"
40: unicode(0) ""
41: unicode(5) "a.php"
42: unicode(5) "a.php"
43: unicode(16) "phar://*/b/c.php"
44: unicode(16) "phar://*/b/c.php"
45: unicode(1) "b"
46: unicode(7) "b/c.php"
47: unicode(5) "c.php"
48: unicode(16) "phar://*/b/d.php"
49: unicode(16) "phar://*/b/d.php"
50: unicode(1) "b"
51: unicode(7) "b/d.php"
52: unicode(5) "d.php"
53: unicode(14) "phar://*/b.php"
54: unicode(14) "phar://*/b.php"
55: unicode(0) ""
56: unicode(5) "b.php"
57: unicode(5) "b.php"
58: unicode(14) "phar://*/e.php"
59: unicode(14) "phar://*/e.php"
60: unicode(0) ""
61: unicode(5) "e.php"
62: unicode(5) "e.php"
63: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>