Skip to content

Commit e435613

Browse files
committed
Fix file clash in file_put_contents() tests
1 parent ffacda1 commit e435613

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ext/standard/tests/file/file_get_contents_file_put_contents_basic.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ echo "*** Testing the basic functionality of file_put_contents() and file_get_co
1010

1111
echo "-- Testing with simple valid data file --\n";
1212

13-
$file_name = "/file_put_contents.tmp";
13+
$file_name = "/file_put_contents_basic.tmp";
1414
fill_buffer($text_buffer, "text", 100);
1515
file_put_contents( $file_path.$file_name, $text_buffer );
1616

1717
var_dump( file_get_contents($file_path.$file_name) );
1818

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

21-
$file_name = "/file_put_contents1.tmp";
21+
$file_name = "/file_put_contents_basic1.tmp";
2222
file_put_contents( $file_path.$file_name, "");
2323
var_dump( file_get_contents( $file_path.$file_name ) );
2424

@@ -27,8 +27,8 @@ echo "\n*** Done ***";
2727
--CLEAN--
2828
<?php
2929
$file_path = __DIR__;
30-
unlink($file_path."/file_put_contents.tmp");
31-
unlink($file_path."/file_put_contents1.tmp");
30+
unlink($file_path."/file_put_contents_basic.tmp");
31+
unlink($file_path."/file_put_contents_basic1.tmp");
3232
?>
3333
--EXPECT--
3434
*** Testing the basic functionality of file_put_contents() and file_get_contents() functions ***

ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ $file_path = __DIR__;
1010
echo "\n-- Testing with Non-existing file --\n";
1111
print( file_get_contents("/no/such/file/or/dir") );
1212

13-
$file_handle = fopen($file_path."/file_put_contents.tmp", "w");
13+
$file_handle = fopen($file_path."/file_put_contents_error.tmp", "w");
1414

1515
echo "\n-- Testing for invalid negative maxlen values --\n";
16-
file_put_contents($file_path."/file_put_contents1.tmp", "Garbage data in the file");
16+
file_put_contents($file_path."/file_put_contents_error1.tmp", "Garbage data in the file");
1717
try {
18-
file_get_contents($file_path."/file_put_contents1.tmp", FALSE, NULL, 0, -5);
18+
file_get_contents($file_path."/file_put_contents_error1.tmp", FALSE, NULL, 0, -5);
1919
} catch (ValueError $exception) {
2020
echo $exception->getMessage() . "\n";
2121
}
@@ -27,8 +27,8 @@ echo "\n*** Done ***\n";
2727
--CLEAN--
2828
<?php
2929
$file_path = __DIR__;
30-
unlink($file_path."/file_put_contents.tmp");
31-
unlink($file_path."/file_put_contents1.tmp");
30+
unlink($file_path."/file_put_contents_error.tmp");
31+
unlink($file_path."/file_put_contents_error1.tmp");
3232

3333
?>
3434
--EXPECTF--

0 commit comments

Comments
 (0)