php-src/ext/phar/tests/phar_oo_getcontents.phpt
2008-04-10 13:41:29 +00:00

26 lines
572 B
PHP

--TEST--
Phar object: getContent()
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
--INI--
phar.readonly=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
$phar = new Phar($fname);
$phar['a'] = 'file contents
this works';
echo $phar['a']->getContent() . "\n";
?>
===DONE===
--CLEAN--
<?php
unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
__halt_compiler();
?>
--EXPECT--
file contents
this works
===DONE===