php-8.0.30-src/ext/phar/tests/zip/corrupt_007.phpt

15 lines
380 B
PHP

--TEST--
Phar: corrupted zip (truncated filename record)
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE--
<?php
try {
new PharData(__DIR__ . '/files/truncfilename.zip');
} catch (Exception $e) {
echo $e->getMessage() . "\n";
}
?>
--EXPECTF--
phar error: corrupted central directory entry, no magic signature in zip-based phar "%struncfilename.zip"