xref: /PHP-5.4/ext/zip/tests/bug40228.phpt (revision 601a77b3)
1--TEST--
2Bug #40228 (extractTo does not create recursive empty path)
3--SKIPIF--
4<?php if (!extension_loaded("zip")) print "skip"; ?>
5--FILE--
6<?php
7$dest = dirname(__FILE__);
8$arc_name = $dest . "/bug40228.zip";
9$zip = new ZipArchive;
10$zip->open($arc_name, ZIPARCHIVE::CREATE);;
11$zip->extractTo($dest);
12if (is_dir($dest . '/test/empty')) {
13	echo "Ok\n";
14	rmdir($dest . '/test/empty');
15	rmdir($dest . '/test');
16} else {
17	echo "Failed.\n";
18}
19echo "Done\n";
20?>
21--EXPECT--
22Ok
23Done
24