xref: /php-src/ext/phar/tests/002.phpt (revision 74859783)
1--TEST--
2Phar::mapPhar truncated manifest/improper params
3--EXTENSIONS--
4phar
5--FILE--
6<?php
7try {
8    Phar::mapPhar(5, 'hio', 'hi');
9} catch (TypeError $e) {
10    echo $e->getMessage(), "\n";
11}
12
13try {
14    Phar::mapPhar();
15} catch (Exception $e) {
16    echo $e->getMessage(), "\n";
17}
18__HALT_COMPILER(); ?>
19--EXPECTF--
20Phar::mapPhar() expects at most 2 arguments, 3 given
21internal corruption of phar "%s002.php" (truncated manifest at manifest length)
22