From: Greg Beaver Date: Sat, 26 Apr 2008 17:20:50 +0000 (+0000) Subject: new test increases code coverage X-Git-Tag: RELEASE_2_0_0b1~193 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b22cc67e6ba1591aaed9d8dacfc2391eb2794f43;p=php new test increases code coverage --- diff --git a/ext/phar/tests/zip/exists_as_phar.phpt b/ext/phar/tests/zip/exists_as_phar.phpt new file mode 100644 index 0000000000..d7e739c1f1 --- /dev/null +++ b/ext/phar/tests/zip/exists_as_phar.phpt @@ -0,0 +1,37 @@ +--TEST-- +Phar: phar-based phar named with ".zip" fails +--SKIPIF-- + +--INI-- +phar.readonly=0 +phar.require_hash=0 +--FILE-- +'; +$phar->setAlias('hio'); +$phar->addEmptyDir('test'); +$phar->stopBuffering(); +copy($fname, $tname); + +try { + $p = new Phar($tname); +} catch (Exception $e) { + echo $e->getMessage() . "\n"; +} + +?> +===DONE=== +--CLEAN-- + +--EXPECTF-- +phar zip error: phar "%sexists_as_phar.phar.zip" already exists as a regular phar and must be deleted from disk prior to creating as a zip-based phar +===DONE===