Annotation of embedaddon/php/ext/phar/tests/phar_buildfromiterator1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar::buildFromIterator() readonly
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: $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
11: try {
12: ini_set('phar.readonly', 1);
13: $phar->buildFromIterator(1);
14: } catch (Exception $e) {
15: var_dump(get_class($e));
16: echo $e->getMessage() . "\n";
17: }
18: ?>
19: ===DONE===
20: --CLEAN--
21: <?php
22: unlink(dirname(__FILE__) . '/buildfromiterator.phar');
23: __HALT_COMPILER();
24: ?>
25: --EXPECTF--
26: %s(24) "UnexpectedValueException"
27: Cannot write out phar archive, phar is read-only
28: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>