diff options
Diffstat (limited to 'ext/standard/tests/file/fwrite_basic-win32.phpt')
-rw-r--r-- | ext/standard/tests/file/fwrite_basic-win32.phpt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/standard/tests/file/fwrite_basic-win32.phpt b/ext/standard/tests/file/fwrite_basic-win32.phpt index 81d9360276..52d3d033c1 100644 --- a/ext/standard/tests/file/fwrite_basic-win32.phpt +++ b/ext/standard/tests/file/fwrite_basic-win32.phpt @@ -31,8 +31,8 @@ foreach($file_content_types as $file_content_type) { echo "\n-- Testing fwrite() with file having data of type ". $file_content_type ." --\n"; $filename = dirname(__FILE__)."/fwrite_basic-win32.tmp"; // this is name of the file - for($inner_loop_counter = 0; - $inner_loop_counter < count($file_modes); + for($inner_loop_counter = 0; + $inner_loop_counter < count($file_modes); $inner_loop_counter++) { echo "-- File opened in mode : " . $file_modes[$inner_loop_counter]. " --\n"; /* open the file using $files_modes and perform fwrite() on it */ @@ -44,14 +44,14 @@ foreach($file_content_types as $file_content_type) { $data_to_be_written=""; fill_buffer($data_to_be_written, $file_content_type, 1024); //get the data of size 1024 - /* Write the data in to the file, verify the write by checking file pointer position, + /* Write the data in to the file, verify the write by checking file pointer position, eof position, and data. */ // writing 100 bytes var_dump( ftell($file_handle) ); // Expecting 0 var_dump( fwrite($file_handle, $data_to_be_written, 100)); //int(100) var_dump( feof($file_handle) ); // expected : false var_dump( ftell($file_handle) ); //expected: 100 - + // trying to write more than the available data, available 1024 bytes but trying 2048 var_dump( fwrite($file_handle, $data_to_be_written, 2048)); //int(1024) var_dump( feof($file_handle) ); // expected : false @@ -66,7 +66,7 @@ foreach($file_content_types as $file_content_type) { var_dump( fclose($file_handle) ); //expected : true clearstatcache();//clears file status cache var_dump( filesize($filename) ); // expected: 2148 - var_dump(md5(file_get_contents($filename))); // hash the output + var_dump(md5(file_get_contents($filename))); // hash the output } // end of inner for loop |