Skip to content

Commit

Permalink
Merge branch 'PHP-8.3' into PHP-8.4
Browse files Browse the repository at this point in the history
* PHP-8.3:
  Fix potential parallel test conflicts
  • Loading branch information
cmb69 committed Sep 29, 2024
2 parents f4f2fe5 + a17634c commit ebee8df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions ext/standard/tests/file/file_get_contents_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ echo "*** Testing the basic functionality of the file_get_contents() function **
echo "-- Testing with simple valid data file --\n";


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

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

create_files($file_path, 1, "empty", 0755, 100, "w", "file", 1, "byte");
var_dump( file_get_contents($file_path."/file1.tmp") );
create_files($file_path, 1, "empty", 0755, 100, "w", "file_get_contents_basic", 1, "byte");
var_dump( file_get_contents($file_path."/file_get_contents_basic1.tmp") );

echo "\n*** Done ***";
?>
Expand Down
6 changes: 3 additions & 3 deletions ext/standard/tests/file/file_get_contents_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ include($file_path."/file.inc");
echo "\n-- Testing with Non-existing file --\n";
print( file_get_contents("/no/such/file/or/dir") );

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

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

delete_files($file_path, 1);
delete_files($file_path, 1, "file_get_contents_error", 1);
fclose($file_handle);
unlink($file_path."/file_put_contents_error.tmp");

Expand Down

0 comments on commit ebee8df

Please sign in to comment.