Skip to content

Commit 36c1024

Browse files
committed
Remove meaningless md5 string && Attempt to fix #63184
1 parent f495e93 commit 36c1024

File tree

2 files changed

+29
-31
lines changed

2 files changed

+29
-31
lines changed

ext/spl/tests/RecursiveDirectoryIterator_getSubPath_basic.phpt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Pawel Krynicki <pawel [dot] krynicki [at] xsolve [dot] pl>
55
#testfest AmsterdamPHP 2012-06-23
66
--FILE--
77
<?php
8-
$depth0 = md5('recursiveDirectoryIterator::getSubPath');
9-
$depth1 = md5('depth1');
10-
$depth2 = md5('depth2');
8+
$depth0 = "depth0";
9+
$depth1 = 'depth1';
10+
$depth2 = 'depth2';
1111
$targetDir = __DIR__ . DIRECTORY_SEPARATOR . $depth0 . DIRECTORY_SEPARATOR . $depth1 . DIRECTORY_SEPARATOR . $depth2;
1212
mkdir($targetDir, 0777, true);
1313
touch($targetDir . DIRECTORY_SEPARATOR . 'getSubPath_test.tmp');
@@ -24,29 +24,29 @@ foreach ($list as $item) {
2424
echo $item . "\n";
2525
}
2626
?>
27-
==DONE==
2827
--CLEAN--
2928
<?php
3029
function rrmdir($dir) {
31-
foreach(glob($dir . '/*') as $file) {
32-
if(is_dir($file)) {
30+
foreach(glob($dir . '/*') as $file) {
31+
if(is_dir($file)) {
3332
rrmdir($file);
34-
} else {
33+
} else {
3534
unlink($file);
36-
}
37-
}
35+
}
36+
}
3837

39-
rmdir($dir);
40-
}
38+
rmdir($dir);
39+
}
4140

42-
$targetDir = __DIR__.DIRECTORY_SEPARATOR.md5('recursiveDirectoryIterator::getSubPath');
43-
rrmdir($targetDir);
41+
$targetDir = __DIR__.DIRECTORY_SEPARATOR . "depth0";
42+
rrmdir($targetDir);
4443
?>
4544

4645
--EXPECTF--
47-
a0c967a6c2c34786e4802f59af9356f5
48-
a0c967a6c2c34786e4802f59af9356f5
49-
a0c967a6c2c34786e4802f59af9356f5%c9925aabb545352472e4d77942627b507
50-
a0c967a6c2c34786e4802f59af9356f5%c9925aabb545352472e4d77942627b507
51-
a0c967a6c2c34786e4802f59af9356f5%c9925aabb545352472e4d77942627b507
46+
depth1
47+
depth1
48+
depth1%cdepth2
49+
depth1%cdepth2
50+
depth1%cdepth2
5251
==DONE==
52+

ext/spl/tests/RecursiveDirectoryIterator_getSubPathname_basic.phpt

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Pawel Krynicki <pawel [dot] krynicki [at] xsolve [dot] pl>
55
#testfest AmsterdamPHP 2012-06-23
66
--FILE--
77
<?php
8-
$depth0 = md5('recursiveDirectoryIterator::getSubPathname');
9-
$depth1 = md5('depth1');
10-
$depth2 = md5('depth2');
8+
$depth0 = "depth0";
9+
$depth1 = "depth1";
10+
$depth2 = "depth2";
1111
$targetDir = __DIR__ . DIRECTORY_SEPARATOR . $depth0 . DIRECTORY_SEPARATOR . $depth1 . DIRECTORY_SEPARATOR . $depth2;
1212
mkdir($targetDir, 0777, true);
1313
touch($targetDir . DIRECTORY_SEPARATOR . 'getSubPathname_test_2.tmp');
@@ -26,7 +26,6 @@ foreach ($list as $item) {
2626
echo $item . "\n";
2727
}
2828
?>
29-
==DONE==
3029
--CLEAN--
3130
<?php
3231
function rrmdir($dir) {
@@ -41,18 +40,17 @@ function rrmdir($dir) {
4140
rmdir($dir);
4241
}
4342

44-
$targetDir = __DIR__ . DIRECTORY_SEPARATOR . md5('recursiveDirectoryIterator::getSubPathname');
43+
$targetDir = __DIR__ . DIRECTORY_SEPARATOR . "depth0";
4544
rrmdir($targetDir);
4645
?>
4746
--EXPECTF--
4847
.
49-
.
5048
..
51-
a0c967a6c2c34786e4802f59af9356f5%c.
52-
a0c967a6c2c34786e4802f59af9356f5%c..
53-
a0c967a6c2c34786e4802f59af9356f5%c9925aabb545352472e4d77942627b507%c.
54-
a0c967a6c2c34786e4802f59af9356f5%c9925aabb545352472e4d77942627b507%c..
55-
a0c967a6c2c34786e4802f59af9356f5%c9925aabb545352472e4d77942627b507%cgetSubPathname_test_2.tmp
56-
a0c967a6c2c34786e4802f59af9356f5%cgetSubPathname_test_3.tmp
49+
..
50+
depth1%c.
51+
depth1%c..
52+
depth1%cdepth2%c.
53+
depth1%cdepth2%c..
54+
depth1%cdepth2%cgetSubPathname_test_2.tmp
55+
depth1%cgetSubPathname_test_3.tmp
5756
getSubPathname_test_1.tmp
58-
==DONE==

0 commit comments

Comments
 (0)