1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Files
archived-php-src/ext/zip/tests/bug40228.phpt
T
Christoph M. Becker 7f0a1e2f2d Fix bug40228*.phpt conflict
Both tests use the same directory structure; we avoid that by
extracting to separate subdirectories.

Closes GH-7831.
2021-12-26 23:23:56 +01:00

25 lines
512 B
PHP

--TEST--
Bug #40228 (extractTo does not create recursive empty path)
--SKIPIF--
<?php if (!extension_loaded("zip")) print "skip"; ?>
--FILE--
<?php
$dest = __DIR__ . "/bug40228";
$arc_name = __DIR__ . "/bug40228.zip";
$zip = new ZipArchive;
$zip->open($arc_name, ZIPARCHIVE::CREATE);
$zip->extractTo($dest);
if (is_dir($dest . '/test/empty')) {
echo "Ok\n";
rmdir($dest . '/test/empty');
rmdir($dest . '/test');
rmdir($dest);
} else {
echo "Failed.\n";
}
echo "Done\n";
?>
--EXPECT--
Ok
Done