]> granicus.if.org Git - php/commitdiff
new test for webPhar failure on opening file
authorGreg Beaver <cellog@php.net>
Wed, 23 Apr 2008 16:03:08 +0000 (16:03 +0000)
committerGreg Beaver <cellog@php.net>
Wed, 23 Apr 2008 16:03:08 +0000 (16:03 +0000)
ext/phar/tests/webphar_compilefail.phpt [new file with mode: 0644]

diff --git a/ext/phar/tests/webphar_compilefail.phpt b/ext/phar/tests/webphar_compilefail.phpt
new file mode 100644 (file)
index 0000000..ab5532d
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Phar: Phar::webPhar, open compiled file fails
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+phar.readonly=1
+--FILE--
+<?php
+try {
+Phar::webPhar('oopsiedaisy.phar', '/index.php');
+} catch (Exception $e) {
+echo $e->getMessage() . "\n";
+}
+__HALT_COMPILER();
+?>
+--EXPECTF--
+internal corruption of phar "%swebphar_compilefail.php" (truncated manifest at manifest length)
\ No newline at end of file