Skip to content

Commit b154c12

Browse files
committed
Fix file clash in rename_variation.phpt
rename_variation2.tmp is ... unsurprisingly ... already used by rename_variation2.phpt. Alternatively it could be placed in the directory that the test creates, but maybe this is intended to test cross-directory renames, so I'll leave it.
1 parent a6c9c7c commit b154c12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/standard/tests/file/rename_variation.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ $src_filenames = array(
2626
"$file_path//rename_variation//rename_variation.tmp",
2727
);
2828
$counter = 1;
29-
/* loop through each $file and rename it to rename_variation2.tmp */
29+
/* loop through each $file and rename it to rename_variation_renamed.tmp */
3030
foreach($src_filenames as $src_filename) {
3131
echo "-- Iteration $counter --\n";
3232
$fp = fopen("$file_path/rename_variation/rename_variation.tmp", "w");
3333
fclose($fp);
34-
$dest_filename = "$file_path/rename_variation2.tmp";
34+
$dest_filename = "$file_path/rename_variation_renamed.tmp";
3535
var_dump( rename($src_filename, $dest_filename) );
3636
// ensure that file got renamed to new name
3737
var_dump( file_exists($src_filename) ); // expecting false

0 commit comments

Comments
 (0)