summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghubansh Kumar <kraghuba@php.net>2007-11-02 03:56:02 +0000
committerRaghubansh Kumar <kraghuba@php.net>2007-11-02 03:56:02 +0000
commit3fbaa4b8736cfad803c4a5943fc19610e47bd213 (patch)
treed8d65f29aa92193a45a67f8cd35b435c299059e0
parent790b763be78213b6e385506ad51c4700b7bac247 (diff)
downloadphp-git-3fbaa4b8736cfad803c4a5943fc19610e47bd213.tar.gz
fix tests: proper temp file names
-rw-r--r--ext/standard/tests/file/file_basic.phpt12
-rw-r--r--ext/standard/tests/file/file_variation.phpt14
2 files changed, 13 insertions, 13 deletions
diff --git a/ext/standard/tests/file/file_basic.phpt b/ext/standard/tests/file/file_basic.phpt
index cb15a52c83..e1d9ec561a 100644
--- a/ext/standard/tests/file/file_basic.phpt
+++ b/ext/standard/tests/file/file_basic.phpt
@@ -13,17 +13,17 @@ echo "*** Testing file() with basic files ***\n";
$filetypes = array("numeric", "text", "empty", "text_with_new_line");
foreach( $filetypes as $type ) {
- create_files($file_path, 1, $type, 0755, 100, "w", "file", 1, "byte");
- print_r( file($file_path."/file1.tmp") );
- delete_files($file_path, 1);
+ create_files($file_path, 1, $type, 0755, 100, "w", "file_basic", 1, "byte");
+ print_r( file($file_path."/file_basic1.tmp") );
+ delete_files($file_path, 1, "file_basic");
}
echo "*** Testing for return type of file function ***\n";
foreach( $filetypes as $type ) {
- create_files($file_path, 1, $type);
- $ret_arr = file($file_path."/file1.tmp");
+ create_files($file_path, 1, $type, 0755, 1, "w", "file_basic");
+ $ret_arr = file($file_path."/file_basic1.tmp");
var_dump( is_array($ret_arr) );
- delete_files($file_path, 1);
+ delete_files($file_path, 1, "file_basic");
}
echo "\n--- Done ---";
diff --git a/ext/standard/tests/file/file_variation.phpt b/ext/standard/tests/file/file_variation.phpt
index b83148ba8d..4672f7d683 100644
--- a/ext/standard/tests/file/file_variation.phpt
+++ b/ext/standard/tests/file/file_variation.phpt
@@ -10,7 +10,7 @@ Test file() function : usage variations
$file_path = dirname(__FILE__);
require($file_path."/file.inc");
-$filename = $file_path."/file.tmp";
+$filename = $file_path."/file_variation.tmp";
$data_array = array( "Garbage data", "Gar\nba\nge d\nata", "Gar\n\nbage \n\n data" );
@@ -27,18 +27,18 @@ foreach( $data_array as $data ) {
}
echo "*** Testing with variation in use_include_path argument ***\n";
-$dir = "/file";
+$dir = "/file_variation";
$file_path = dirname(__FILE__).$dir;
mkdir($file_path);
ini_set( 'include_path', $file_path );
-$filename = $file_path."/file1.tmp";
+$filename = $file_path."/file1_variation.tmp";
$buffer_types = array("text", "numeric", "alphanumeric", "text_with_new_line");
foreach( $buffer_types as $type) {
fill_buffer($buffer, $type, 100);
file_put_contents($filename, $buffer );
- var_dump( file("file1.tmp", FILE_USE_INCLUDE_PATH) );
+ var_dump( file("file1_variation.tmp", FILE_USE_INCLUDE_PATH) );
var_dump( file($filename, FILE_IGNORE_NEW_LINES) );
var_dump( file($filename, FILE_SKIP_EMPTY_LINES) );
@@ -52,11 +52,11 @@ echo "\n--- Done ---";
// Removing the temporary files and directory
$file_path = dirname(__FILE__);
-unlink($file_path."/file.tmp");
+unlink($file_path."/file_variation.tmp");
-$dir = "/file";
+$dir = "/file_variation";
$file_path = dirname(__FILE__).$dir;
-unlink($file_path."/file1.tmp");
+unlink($file_path."/file1_variation.tmp");
rmdir($file_path);
?>