Annotation of embedaddon/php/ext/phar/tests/phar_oo_012b.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar object: unset 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: $phar->setInfoClass('SplFileObject');
20:
21: $phar['f.php'] = 'hi';
22: var_dump(isset($phar['f.php']));
23: echo $phar['f.php'];
24: echo "\n";
25: unset($phar['f.php']);
26: var_dump(isset($phar['f.php']));
27: }
28: catch (BadMethodCallException $e)
29: {
30: echo "Exception: " . $e->getMessage() . "\n";
31: }
32:
33: ?>
34: ===DONE===
35: --CLEAN--
36: <?php
37: unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php');
38: __halt_compiler();
39: ?>
40: --EXPECTF--
41: Exception: Write operations disabled by the php.ini setting phar.readonly
42: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>