Annotation of embedaddon/php/ext/phar/tests/create_new_phar.phpt, revision 1.1.1.2
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=0
7: phar.require_hash=1
8: --FILE--
9: <?php
10:
11: file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php',
1.1.1.2 ! misho 12: "brand new!\n");
1.1 misho 13: include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php';
1.1.1.2 ! misho 14:
! 15: $fileName = "ChineseFile\xE5\x84\xB7\xE9\xBB\x91.php";
! 16: file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/$fileName.php',
! 17: 'Text in utf8 file.');
! 18: include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/$fileName.php';
1.1 misho 19: ?>
20:
21: ===DONE===
22: --CLEAN--
23: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
24: --EXPECT--
25: brand new!
1.1.1.2 ! misho 26: Text in utf8 file.
1.1 misho 27: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>