Skip to content

Commit 4f34a69

Browse files
author
Greg Beaver
committed
new test for Phar::getModified()
1 parent 6b3562c commit 4f34a69

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
--TEST--
2+
Phar::getModified()
3+
--SKIPIF--
4+
<?php if (!extension_loaded("phar")) print "skip"; ?>
5+
<?php if (!extension_loaded("zlib")) print "skip zlib not present"; ?>
6+
--INI--
7+
phar.require_hash=0
8+
phar.readonly=0
9+
--FILE--
10+
<?php
11+
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
12+
$pname = 'phar://' . $fname;
13+
$file = '<?php __HALT_COMPILER(); ?>';
14+
15+
$files = array();
16+
$files['a'] = 'a';
17+
$files['b'] = 'b';
18+
$files['c'] = 'c';
19+
20+
include 'phar_test.inc';
21+
22+
$phar = new Phar($fname);
23+
var_dump($phar->getModified());
24+
$phar->compressAllFilesGZ();
25+
var_dump($phar->getModified());
26+
?>
27+
===DONE===
28+
--CLEAN--
29+
<?php
30+
unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
31+
?>
32+
--EXPECTF--
33+
bool(false)
34+
bool(true)
35+
===DONE===

0 commit comments

Comments
 (0)