Annotation of embedaddon/php/ext/phar/tests/013.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Phar::mapPhar filesize mismatch
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("phar")) die("skip");?>
! 5: --INI--
! 6: phar.require_hash=0
! 7: --FILE--
! 8: <?php
! 9: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
! 10: $pname = 'phar://' . $fname;
! 11: $file = "<?php __HALT_COMPILER(); ?>";
! 12: // filesize should be 1, and is 2
! 13:
! 14: $files = array();
! 15: $files['a'] = array('cont'=>'a', 'ulen'=>2, 'clen'=>2);
! 16: include 'files/phar_test.inc';
! 17:
! 18: echo file_get_contents($pname.'/a');
! 19: ?>
! 20: --CLEAN--
! 21: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
! 22: --EXPECTF--
! 23: Warning: file_get_contents(phar://%s/a): failed to open stream: phar error: internal corruption of phar "%s" (%s file "a") in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>