Skip to content

Commit 7f0a1e2

Browse files
committed
Fix bug40228*.phpt conflict
Both tests use the same directory structure; we avoid that by extracting to separate subdirectories. Closes GH-7831.
1 parent 5005445 commit 7f0a1e2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ext/zip/tests/bug40228-mb.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ Bug #40228 (extractTo does not create recursive empty path)
44
<?php if (!extension_loaded("zip")) print "skip"; ?>
55
--FILE--
66
<?php
7-
$dest = __DIR__;
8-
$arc_name = $dest . "/bug40228私はガラスを食べられます.zip";
7+
$dest = __DIR__ . "/bug40228-mb";
8+
$arc_name = __DIR__ . "/bug40228私はガラスを食べられます.zip";
99
$zip = new ZipArchive;
1010
$zip->open($arc_name, ZIPARCHIVE::CREATE);
1111
$zip->extractTo($dest);
1212
if (is_dir($dest . '/test/empty')) {
1313
echo "Ok\n";
1414
rmdir($dest . '/test/empty');
1515
rmdir($dest . '/test');
16+
rmdir($dest);
1617
} else {
1718
echo "Failed.\n";
1819
}

ext/zip/tests/bug40228.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ Bug #40228 (extractTo does not create recursive empty path)
44
<?php if (!extension_loaded("zip")) print "skip"; ?>
55
--FILE--
66
<?php
7-
$dest = __DIR__;
8-
$arc_name = $dest . "/bug40228.zip";
7+
$dest = __DIR__ . "/bug40228";
8+
$arc_name = __DIR__ . "/bug40228.zip";
99
$zip = new ZipArchive;
1010
$zip->open($arc_name, ZIPARCHIVE::CREATE);
1111
$zip->extractTo($dest);
1212
if (is_dir($dest . '/test/empty')) {
1313
echo "Ok\n";
1414
rmdir($dest . '/test/empty');
1515
rmdir($dest . '/test');
16+
rmdir($dest);
1617
} else {
1718
echo "Failed.\n";
1819
}

0 commit comments

Comments
 (0)