Annotation of embedaddon/php/ext/phar/tests/phar_oo_011b.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar object: add file
3: --SKIPIF--
4: <?php if (!extension_loaded('phar')) die('skip'); ?>
5: <?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
6: --INI--
7: phar.readonly=1
8: phar.require_hash=0
9: --FILE--
10: <?php
11:
12: try
13: {
14: $pharconfig = 0;
15:
16: require_once 'files/phar_oo_test.inc';
17:
18: $phar = new Phar($fname);
19:
20: $phar['f.php'] = 'hi';
21: var_dump(isset($phar['f.php']));
22: echo $phar['f.php'];
23: echo "\n";
24: }
25: catch (BadMethodCallException $e)
26: {
27: echo "Exception: " . $e->getMessage() . "\n";
28: }
29:
30: ?>
31: ===DONE===
32: --CLEAN--
33: <?php
34: unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
35: __halt_compiler();
36: ?>
37: --EXPECTF--
38: Exception: Write operations disabled by the php.ini setting phar.readonly
39: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>