xref: /php-src/ext/phar/tests/zip/corrupt_001.phpt (revision 74859783)
1--TEST--
2Phar: corrupted zip (count mismatch)
3--EXTENSIONS--
4phar
5--FILE--
6<?php
7try {
8    new PharData(__DIR__ . '/files/count1.zip');
9} catch (Exception $e) {
10    echo $e->getMessage() . "\n";
11}
12try {
13    new PharData(__DIR__ . '/files/count2.zip');
14} catch (Exception $e) {
15    echo $e->getMessage() . "\n";
16}
17?>
18--EXPECTF--
19phar error: corrupt zip archive, conflicting file count in end of central directory record in zip-based phar "%scount1.zip"
20phar error: corrupt zip archive, conflicting file count in end of central directory record in zip-based phar "%scount2.zip"
21