diff options
author | Greg Beaver <cellog@php.net> | 2008-04-24 17:19:01 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2008-04-24 17:19:01 +0000 |
commit | 84c622c2ab24e222cbe68db9fff3d66683d3e673 (patch) | |
tree | c6aa1c9ee80dceaf225cf25f3accc1fbfab3a34e /ext/phar/tests/pharfileinfo_destruct.phpt | |
parent | aaf5498ff4df8f0440def8e33c6feaadaa269c07 (diff) | |
download | php-git-84c622c2ab24e222cbe68db9fff3d66683d3e673.tar.gz |
new test for PharFileInfo::__destruct
Diffstat (limited to 'ext/phar/tests/pharfileinfo_destruct.phpt')
-rw-r--r-- | ext/phar/tests/pharfileinfo_destruct.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/phar/tests/pharfileinfo_destruct.phpt b/ext/phar/tests/pharfileinfo_destruct.phpt new file mode 100644 index 0000000000..48a58c0d09 --- /dev/null +++ b/ext/phar/tests/pharfileinfo_destruct.phpt @@ -0,0 +1,25 @@ +--TEST-- +Phar: PharFileInfo::__destruct +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--INI-- +phar.readonly=0 +--FILE-- +<?php +$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$pname = 'phar://' . $fname; + +$a = new Phar($fname); +$a['a/subdir/here'] = 'hi'; + +$b = new PharFileInfo($pname . '/a/subdir'); +unset($b); + +$b = new PharFileInfo($pname . '/a/subdir/here'); +unset($b); +?> +===DONE=== +--CLEAN-- +<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> +--EXPECTF-- +===DONE===
\ No newline at end of file |