xref: /PHP-7.2/ext/phar/tests/phar_oo_011.phpt (revision 17ccbeec)
1--TEST--
2Phar 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--
7phar.readonly=0
8phar.require_hash=0
9--FILE--
10<?php
11
12$pharconfig = 0;
13
14require_once 'files/phar_oo_test.inc';
15
16$phar = new Phar($fname);
17$phar->setInfoClass('SplFileObject');
18
19$phar['hi/f.php'] = 'hi';
20var_dump(isset($phar['hi']));
21var_dump(isset($phar['hi/f.php']));
22echo $phar['hi/f.php'];
23echo "\n";
24
25?>
26===DONE===
27--CLEAN--
28<?php
29unlink(dirname(__FILE__) . '/files/phar_oo_011.phar.php');
30__halt_compiler();
31?>
32--EXPECT--
33bool(true)
34bool(true)
35hi
36===DONE===
37