From: Nikita Popov Date: Fri, 27 Sep 2019 09:10:42 +0000 (+0200) Subject: Fix file clash in rename_variation.phpt X-Git-Tag: php-7.4.0RC3~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b154c12cc92321574ae9f35ac7817e4c1c608f40;p=php 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. --- diff --git a/ext/standard/tests/file/rename_variation.phpt b/ext/standard/tests/file/rename_variation.phpt index c347a223fc..b86c5c8097 100644 --- a/ext/standard/tests/file/rename_variation.phpt +++ b/ext/standard/tests/file/rename_variation.phpt @@ -26,12 +26,12 @@ $src_filenames = array( "$file_path//rename_variation//rename_variation.tmp", ); $counter = 1; -/* loop through each $file and rename it to rename_variation2.tmp */ +/* loop through each $file and rename it to rename_variation_renamed.tmp */ foreach($src_filenames as $src_filename) { echo "-- Iteration $counter --\n"; $fp = fopen("$file_path/rename_variation/rename_variation.tmp", "w"); fclose($fp); - $dest_filename = "$file_path/rename_variation2.tmp"; + $dest_filename = "$file_path/rename_variation_renamed.tmp"; var_dump( rename($src_filename, $dest_filename) ); // ensure that file got renamed to new name var_dump( file_exists($src_filename) ); // expecting false