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

1.1       misho       1: --TEST--
                      2: Phar: delete 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 = "<?php
                     13: Phar::mapPhar('hio');
                     14: __HALT_COMPILER(); ?>";
                     15: 
                     16: $files = array();
                     17: $files['a'] = 'a';
                     18: include 'files/phar_test.inc';
                     19: include $fname;
                     20: $phar = new Phar($fname);
                     21: 
                     22: echo file_get_contents($pname . '/a') . "\n";
                     23: $phar->delete('a');
                     24: echo file_get_contents($pname . '/a') . "\n";
                     25: ?>
                     26: --CLEAN--
                     27: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
                     28: --EXPECTF--
                     29: a
                     30: 
                     31: Warning: file_get_contents(phar://%sdelete.phar.php/a): failed to open stream: phar error: "a" is not a file in phar "%sdelete.phar.php" in %sdelete.php on line 16

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