mirror of
https://github.com/php/php-src.git
synced 2026-04-26 09:28:21 +02:00
new test for Phar::getModified()
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
--TEST--
|
||||
Phar::getModified()
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) print "skip"; ?>
|
||||
<?php if (!extension_loaded("zlib")) print "skip zlib not present"; ?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
phar.readonly=0
|
||||
--FILE--
|
||||
<?php
|
||||
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
||||
$pname = 'phar://' . $fname;
|
||||
$file = '<?php __HALT_COMPILER(); ?>';
|
||||
|
||||
$files = array();
|
||||
$files['a'] = 'a';
|
||||
$files['b'] = 'b';
|
||||
$files['c'] = 'c';
|
||||
|
||||
include 'phar_test.inc';
|
||||
|
||||
$phar = new Phar($fname);
|
||||
var_dump($phar->getModified());
|
||||
$phar->compressAllFilesGZ();
|
||||
var_dump($phar->getModified());
|
||||
?>
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
bool(true)
|
||||
===DONE===
|
||||
Reference in New Issue
Block a user