diff options
Diffstat (limited to 'ext/zip/tests/bug50678.phpt')
-rw-r--r-- | ext/zip/tests/bug50678.phpt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/zip/tests/bug50678.phpt b/ext/zip/tests/bug50678.phpt new file mode 100644 index 0000000000..a09c54dd39 --- /dev/null +++ b/ext/zip/tests/bug50678.phpt @@ -0,0 +1,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'); +?> |