diff options
Diffstat (limited to 'ext/phar/tests/zip/corrupt_007.phpt')
-rw-r--r-- | ext/phar/tests/zip/corrupt_007.phpt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/phar/tests/zip/corrupt_007.phpt b/ext/phar/tests/zip/corrupt_007.phpt new file mode 100644 index 0000000000..80c9139025 --- /dev/null +++ b/ext/phar/tests/zip/corrupt_007.phpt @@ -0,0 +1,17 @@ +--TEST-- +Phar: corrupted zip (truncated filename 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/truncfilename.zip'); +} catch (Exception $e) { + echo $e->getMessage() . "\n"; +} +?> +===DONE=== +--EXPECTF-- +phar error: corrupted central directory entry, no magic signature in zip-based phar "%struncfilename.zip" +===DONE=== |