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

1.1       misho       1: --TEST--
                      2: Phar: delete a file within a .phar
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("phar")) die("skip"); ?>
                      5: --INI--
                      6: phar.readonly=1
                      7: phar.require_hash=0
                      8: --FILE--
                      9: <?php
                     10: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
                     11: $pname = 'phar://' . $fname;
                     12: $file = "<?php __HALT_COMPILER(); ?>";
                     13: 
                     14: $files = array();
                     15: $files['a.php'] = '<?php echo "This is a\n"; ?>';
                     16: $files['b.php'] = '<?php echo "This is b\n"; ?>';
                     17: $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
                     18: include 'files/phar_test.inc';
                     19: 
                     20: include $pname . '/a.php';
                     21: include $pname . '/b.php';
                     22: include $pname . '/b/c.php';
                     23: unlink($pname . '/b/c.php');
                     24: ?>
                     25: ===AFTER===
                     26: <?php
                     27: include $pname . '/a.php';
                     28: include $pname . '/b.php';
                     29: include $pname . '/b/c.php';
                     30: ?>
                     31: 
                     32: ===DONE===
                     33: --CLEAN--
                     34: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
                     35: --EXPECTF--
                     36: This is a
                     37: This is b
                     38: This is b/c
                     39: 
                     40: Warning: unlink(): phar error: write operations disabled by the php.ini setting phar.readonly in %sdelete_in_phar_b.php on line %d
                     41: ===AFTER===
                     42: This is a
                     43: This is b
                     44: This is b/c
                     45: 
                     46: ===DONE===

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