php-src/ext/phar/tests/zip/corrupt_002.phpt
2008-04-19 05:35:03 +00:00

18 lines
442 B
PHP

--TEST--
Phar: corrupted zip (no end of zip record)
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
--FILE--
<?php
try {
new PharData(dirname(__FILE__) . '/files/nozipend.zip');
} catch (Exception $e) {
echo $e->getMessage() . "\n";
}
?>
===DONE===
--EXPECTF--
phar error: end of central directory not found in zip-based phar "%snozipend.zip"
===DONE===