xref: /php-src/ext/phar/tests/009.phpt (revision 74859783)
1--TEST--
2Phar::mapPhar too many manifest entries
3--EXTENSIONS--
4phar
5--INI--
6phar.require_hash=0
7--FILE--
8<?php
9$file = "<?php
10Phar::mapPhar('hio');
11__HALT_COMPILER(); ?>";
12$file .= pack('VVnVVV', 500, 500, 0x1000, 0x00000000, 0, 0) .  str_repeat('A', 500);
13file_put_contents(__DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php', $file);
14try {
15include __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php';
16} catch (Exception $e) {
17echo $e->getMessage();
18}
19?>
20--CLEAN--
21<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
22--EXPECTF--
23internal corruption of phar "%s009.phar.php" (too many manifest entries for size of manifest)
24