xref: /PHP-5.6/ext/phar/tests/create_new_phar.phpt (revision ea4cee93)
1--TEST--
2Phar: create a completely new phar
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5--INI--
6phar.readonly=0
7phar.require_hash=1
8--FILE--
9<?php
10
11file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php',
12	"brand new!\n");
13include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php';
14
15$fileName = "ChineseFile\xE5\x84\xB7\xE9\xBB\x91.php";
16file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/$fileName.php',
17	'Text in utf8 file.');
18include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/$fileName.php';
19?>
20
21===DONE===
22--CLEAN--
23<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
24--EXPECT--
25brand new!
26Text in utf8 file.
27===DONE===
28