Annotation of embedaddon/php/ext/phar/tests/bug48377.2.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Phar: PHP bug #48377 "error message unclear on converting phar with existing file" test #2
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("phar")) die("skip"); ?>
! 5: --INI--
! 6: phar.require_hash=0
! 7: phar.readonly=0
! 8: --FILE--
! 9: <?php
! 10: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip';
! 11:
! 12: $phar = new PharData($fname);
! 13: $phar['x'] = 'hi';
! 14: try {
! 15: $phar->convertToData(Phar::ZIP, Phar::NONE, '.2.phar.zip');
! 16: } catch (BadMethodCallException $e) {
! 17: echo $e->getMessage(),"\n";
! 18: }
! 19: ?>
! 20: ===DONE===
! 21: --CLEAN--
! 22: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');?>
! 23: --EXPECTF--
! 24: data phar "%sbug48377.2.phar.zip" has invalid extension 2.phar.zip
! 25: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>