Annotation of embedaddon/php/ext/phar/tests/create_new_phar_c.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: <?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
6: --INI--
7: phar.readonly=0
8: phar.require_hash=1
9: --FILE--
10: <?php
11:
12: file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php',
13: 'brand new!');
14:
15: $phar = new Phar(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php');
16:
17: var_dump($phar->getSignature());
18: ?>
19: ===DONE===
20: --CLEAN--
21: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
22: --EXPECTF--
23: array(2) {
24: ["hash"]=>
25: string(40) "%s"
26: ["hash_type"]=>
27: string(5) "SHA-1"
28: }
29: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>