summaryrefslogtreecommitdiff
path: root/ext/zip/tests/bug50678.phpt
blob: a09c54dd39d97ae4fe229995e37c8b81f7d6a47e (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
26
27
28
29
30
31
--TEST--
Bug #50678 (files extracted by ZipArchive class lost their original modified time)
--SKIPIF--
<?php
if (!extension_loaded('zip')) die('skip zip extension not available');
?>
--INI--
date.timezone=UTC
--FILE--
<?php
$filename = __DIR__ . '/test.zip';
$dirname = __DIR__ . '/bug50678';

@mkdir($dirname);

$zip = new ZipArchive();
$zip->open($filename);
$zip->extractTo($dirname);
$zip->close();

var_dump(date('Ym', filemtime($dirname . '/entry1.txt')));
?>
Done
--EXPECT--
string(6) "200607"
Done
--CLEAN--
<?php
include __DIR__ . '/utils.inc';
rmdir_rf(__DIR__ . '/bug50678');
?>