Browse Source

add safeguard check for timestamp modification to phar_stub.phpt and phar_gzip.phpt

experimental/5.3-FPM
Greg Beaver 18 years ago
parent
commit
26ce51d6f1
  1. 5
      ext/phar/tests/phar_gzip.phpt
  2. 6
      ext/phar/tests/zip/phar_stub.phpt

5
ext/phar/tests/phar_gzip.phpt

@ -42,6 +42,11 @@ $a->setAlias('another');
$b = new Phar($fname2);
var_dump($b->isFileFormat(Phar::PHAR));
var_dump($b->isCompressed() == Phar::GZ);
$a = stat($pname . '/test');
$b = stat($pname2 . '/test');
if ($a['mtime'] != $b['mtime']) {
echo "timestamp changed, was $a[mtime], now $b[mtime]!\n";
}
?>
===DONE===
--CLEAN--

6
ext/phar/tests/zip/phar_stub.phpt

@ -19,6 +19,12 @@ $p['b'] = 'b';
$p['c'] = 'c';
copy($fname2, $fname);
$a = stat($pname . '/a');
$b = stat($pname2 . '/a');
if ($a['mtime'] != $b['mtime']) {
echo "timestamp changed, was $a[mtime], now $b[mtime]!\n";
}
$phar = new Phar($fname);
echo $phar->getStub();

Loading…
Cancel
Save