Annotation of embedaddon/php/ext/phar/tests/rmdir.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar: rmdir test
3: --SKIPIF--
4: <?php if (!extension_loaded("phar")) die("skip"); ?>
5: --INI--
6: phar.readonly=0
7: phar.require_hash=0
8: --FILE--
9: <?php
10: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
11: $pname = 'phar://' . $fname;
12: $file = b"<?php
13: Phar::mapPhar('hio');
14: __HALT_COMPILER(); ?>";
15:
16: $files = array();
17: $files['a/x'] = 'a';
18: include 'files/phar_test.inc';
19: include $fname;
20:
21: echo file_get_contents($pname . '/a/x') . "\n";
22: var_dump(rmdir($pname . '/a'));
23: echo file_get_contents($pname . '/a/x') . "\n";
24: unlink($pname . '/a/x');
25: var_dump(rmdir($pname . '/a'));
26: ?>
27: --CLEAN--
28: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
29: --EXPECTF--
30: a
31:
32: Warning: rmdir(): phar error: Directory not empty in %srmdir.php on line 14
33: bool(false)
34: a
35: bool(true)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>