Skip to content

Commit d7e05c7

Browse files
committed
Use CLEAN section in some tests
1 parent 3b26795 commit d7e05c7

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

ext/standard/tests/file/lstat_stat_variation2.phpt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ $file_path = __DIR__;
88
require("file.inc");
99

1010
/* create temp directory */
11-
mkdir("$file_path/lstat_stat_variation1/"); // temp dir
11+
mkdir("$file_path/lstat_stat_variation2/"); // temp dir
1212

1313
// renaming a directory and check stat
1414
echo "*** Testing stat() for directory after being renamed ***\n";
15-
$old_dirname = "$file_path/lstat_stat_variation1";
16-
$new_dirname = "$file_path/lstat_stat_variation1a";
15+
$old_dirname = "$file_path/lstat_stat_variation2";
16+
$new_dirname = "$file_path/lstat_stat_variation2a";
1717
$old_stat = stat($old_dirname);
1818
clearstatcache();
1919
var_dump( rename($old_dirname, $new_dirname) );
@@ -36,7 +36,8 @@ echo "\n--- Done ---";
3636
--CLEAN--
3737
<?php
3838
$file_path = __DIR__;
39-
rmdir("$file_path/lstat_stat_variation1a");
39+
@rmdir("$file_path/lstat_stat_variation2");
40+
@rmdir("$file_path/lstat_stat_variation2a");
4041
?>
4142
--EXPECT--
4243
*** Testing stat() for directory after being renamed ***

ext/standard/tests/file/rename_variation.phpt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ foreach($src_filenames as $src_filename) {
4242
unlink($dest_filename);
4343
}
4444

45-
// clean the temp dir and file
46-
rmdir("$file_path/rename_variation");
47-
4845
echo "Done\n";
4946
?>
47+
--CLEAN--
48+
<?php
49+
$file_path = __DIR__;
50+
@rmdir("$file_path/rename_variation");
51+
?>
5052
--EXPECTF--
5153
*** Testing rename() : rename files across directories ***
5254
-- Iteration 1 --

0 commit comments

Comments
 (0)