xref: /php-src/ext/zip/tests/bug40228.phpt (revision 96f9501b)
1--TEST--
2Bug #40228 (extractTo does not create recursive empty path)
3--EXTENSIONS--
4zip
5--FILE--
6<?php
7$dest = __DIR__ . "/bug40228";
8$arc_name = __DIR__ . "/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    rmdir($dest);
17} else {
18    echo "Failed.\n";
19}
20echo "Done\n";
21?>
22--EXPECT--
23Ok
24Done
25