summaryrefslogtreecommitdiff
path: root/ext/phar/tests/pharfileinfo_destruct.phpt
blob: 48a58c0d097b8e33af16831dff70f64780c25ba4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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===