Annotation of embedaddon/php/ext/phar/tests/create_new_phar_b.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar: create a completely new phar
3: --SKIPIF--
4: <?php if (!extension_loaded("phar")) die("skip"); ?>
5: --INI--
6: phar.readonly=1
7: phar.require_hash=1
8: --FILE--
9: <?php
10:
11: file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php',
12: 'brand new!');
13: include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php';
14: ?>
15:
16: ===DONE===
17: --CLEAN--
18: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
19: --EXPECTF--
20:
21: Warning: file_put_contents(phar://%screate_new_phar_b.phar.php/a.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %screate_new_phar_b.php on line %d
22:
23: Warning: include(phar://%screate_new_phar_b.phar.php/a.php): failed to open stream: %s in %screate_new_phar_b.php on line %d
24:
25: Warning: include(): Failed opening 'phar://%screate_new_phar_b.phar.php/a.php' for inclusion (include_path='%s') in %screate_new_phar_b.php on line %d
26:
27: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>