summaryrefslogtreecommitdiff
path: root/ext/phar/tests/011.phpt
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2006-01-04 16:43:42 +0000
committerMarcus Boerger <helly@php.net>2006-01-04 16:43:42 +0000
commit8f27248fbf03925f6aee27ff9ff901310bf2df05 (patch)
tree05362bb53e93995d32ea16e348b169e611641680 /ext/phar/tests/011.phpt
parent7ed3be8240b4e3f0259be6bba9cd98d59c897eb8 (diff)
downloadphp-git-8f27248fbf03925f6aee27ff9ff901310bf2df05.tar.gz
- Update tests
Diffstat (limited to 'ext/phar/tests/011.phpt')
-rw-r--r--ext/phar/tests/011.phpt8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/phar/tests/011.phpt b/ext/phar/tests/011.phpt
index 3738e66c57..db1af1844e 100644
--- a/ext/phar/tests/011.phpt
+++ b/ext/phar/tests/011.phpt
@@ -4,17 +4,17 @@ Phar::mapPhar filesize too small in manifest
<?php if (!extension_loaded("phar")) print "skip";?>
--FILE--
<?php
-function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
-register_shutdown_function('cleanup');
$file = "<?php
Phar::mapPhar(5, 'hio', false);
__HALT_COMPILER(); ?>";
// compressed file length does not include 8 bytes for crc/file length and should
$manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 1);
$file .= pack('VV', strlen($manifest) + 4, 1) . $manifest . pack('VV', crc32('a'), 1) . 'a';
-file_put_contents(dirname(__FILE__) . '/008_phar.php', $file);
-include dirname(__FILE__) . '/008_phar.php';
+file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file);
+include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
echo file_get_contents('phar://hio/a');
?>
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
--EXPECTF--
Fatal error: Phar::mapPhar(): internal corruption of phar "%s" (file size in phar is not large enough) in %s on line %d \ No newline at end of file