Annotation of embedaddon/php/ext/phar/tests/phar_running.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar: Phar::running()
3: --SKIPIF--
4: <?php if (!extension_loaded("phar")) die("skip"); ?>
5: --INI--
6: phar.readonly=0
7: --FILE--
8: <?php
9: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
10: $pname = 'phar://' . $fname;
11:
12: $phar = new Phar($fname);
13: $phar['index.php'] = '<?php
14: Phar::running(array());
15: var_dump(Phar::running());
16: var_dump(Phar::running(false));
17: ?>';
18: include $pname . '/index.php';
19: var_dump(Phar::running());
20: ?>
21: ===DONE===
22: --CLEAN--
23: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
24: --EXPECTF--
25: Warning: Phar::running() expects parameter 1 to be boolean, array given in phar://%sphar_running.phar.php/index.php on line 2
26: string(%d) "phar://%sphar_running.phar.php"
27: string(%d) "%sphar_running.phar.php"
28: string(0) ""
29: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>