Skip to content

Commit f564955

Browse files
committed
Fix potential parallel test conflicts
Both tests call `create_files()` with the same `$name_prefix` what might clash. Co-authored-by: Gina Peter Banyard <girgias@php.net> Closes phpGH-16103.
1 parent 19bba83 commit f564955

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ext/standard/tests/file/file_get_contents_basic.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ echo "*** Testing the basic functionality of the file_get_contents() function **
1313
echo "-- Testing with simple valid data file --\n";
1414

1515

16-
create_files($file_path, 1, "text", 0755, 100, "w", "file", 1, "byte");
17-
var_dump( file_get_contents($file_path."/file1.tmp") );
18-
delete_files($file_path, 1);
16+
create_files($file_path, 1, "text", 0755, 100, "w", "file_get_contents_basic", 1, "byte");
17+
var_dump( file_get_contents($file_path."/file_get_contents_basic1.tmp") );
18+
delete_files($file_path, 1, "file_get_contents_basic", 1);
1919

2020
echo "\n-- Testing with empty file --\n";
2121

22-
create_files($file_path, 1, "empty", 0755, 100, "w", "file", 1, "byte");
23-
var_dump( file_get_contents($file_path."/file1.tmp") );
24-
delete_files($file_path, 1);
22+
create_files($file_path, 1, "empty", 0755, 100, "w", "file_get_contents_basic", 1, "byte");
23+
var_dump( file_get_contents($file_path."/file_get_contents_basic1.tmp") );
24+
delete_files($file_path, 1, "file_get_contents_basic", 1);
2525

2626
echo "\n*** Done ***";
2727
?>

ext/standard/tests/file/file_get_contents_error.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ include($file_path."/file.inc");
1313
echo "\n-- Testing with Non-existing file --\n";
1414
print( file_get_contents("/no/such/file/or/dir") );
1515

16-
create_files($file_path, 1, "text", 0755, 100, "w", "file", 1, "byte");
16+
create_files($file_path, 1, "text", 0755, 100, "w", "file_get_contents_error", 1, "byte");
1717
$file_handle = fopen($file_path."/file_put_contents_error.tmp", "w");
1818

1919
echo "\n-- Testing for invalid negative maxlen values --\n";
2020
try {
21-
file_get_contents($file_path."/file1.tmp", FALSE, $file_handle, 0, -5);
21+
file_get_contents($file_path."/file_get_contents_error1.tmp", FALSE, $file_handle, 0, -5);
2222
} catch (ValueError $exception) {
2323
echo $exception->getMessage() . "\n";
2424
}
2525

26-
delete_files($file_path, 1);
26+
delete_files($file_path, 1, "file_get_contents_error", 1);
2727
fclose($file_handle);
2828
unlink($file_path."/file_put_contents_error.tmp");
2929

0 commit comments

Comments
 (0)