mirror of
https://github.com/php/php-src.git
synced 2025-01-09 12:34:14 +08:00
37 lines
788 B
PHP
37 lines
788 B
PHP
--TEST--
|
|
Phar::setAlias()
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
|
--INI--
|
|
phar.require_hash=0
|
|
phar.readonly=0
|
|
--FILE--
|
|
<?php
|
|
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
|
$pname = 'phar://' . $fname;
|
|
$file = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
|
|
|
|
$files = array();
|
|
$files['a'] = 'a';
|
|
$files['b'] = 'b';
|
|
$files['c'] = 'c';
|
|
|
|
include 'files/phar_test.inc';
|
|
|
|
$phar = new Phar($fname);
|
|
echo $phar->getAlias() . "\n";
|
|
$phar->setAlias('test');
|
|
echo $phar->getAlias() . "\n";
|
|
?>
|
|
===DONE===
|
|
--CLEAN--
|
|
<?php
|
|
unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
|
|
unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php');
|
|
__HALT_COMPILER();
|
|
?>
|
|
--EXPECT--
|
|
hio
|
|
test
|
|
===DONE===
|