From: Raghubansh Kumar Date: Fri, 2 Nov 2007 03:56:02 +0000 (+0000) Subject: fix tests: proper temp file names X-Git-Tag: RELEASE_1_3_1~756 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3fbaa4b8736cfad803c4a5943fc19610e47bd213;p=php fix tests: proper temp file names --- 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); ?>