diff options
Diffstat (limited to 'ext/standard/tests/file/disk_total_space_variation.phpt')
| -rw-r--r-- | ext/standard/tests/file/disk_total_space_variation.phpt | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/ext/standard/tests/file/disk_total_space_variation.phpt b/ext/standard/tests/file/disk_total_space_variation.phpt index f722883a3c..c03ba594bd 100644 --- a/ext/standard/tests/file/disk_total_space_variation.phpt +++ b/ext/standard/tests/file/disk_total_space_variation.phpt @@ -1,5 +1,5 @@ --TEST-- -Test disk_total_space() functions : usage variations +Testing disk_total_space() functions : Usage Variations. --FILE-- <?php /* @@ -18,9 +18,9 @@ echo "\nTesting for the return type ***\n"; $return_value = disk_total_space($file_path); var_dump( is_float($return_value) ); -echo "\n*** Testing disk_total_space() function with different directory combinations ***"; - +echo "\n*** Testing with different directory combinations ***"; $dir = "/disk_total_space"; + mkdir($file_path.$dir); $dirs_arr = array( @@ -29,7 +29,7 @@ $dirs_arr = array( $file_path."/.".$dir, /* Testing a file trailing slash */ - $file_path.$dir."/", + $file_path."".$dir."/", $file_path."/.".$dir."/", /* Testing file with double trailing slashes */ @@ -44,6 +44,7 @@ $dirs_arr = array( ".".chr(0).$file_path.$dir.chr(0) ); + $count = 1; /* loop through to test each element the above array */ foreach($dirs_arr as $dir1) { @@ -52,15 +53,19 @@ foreach($dirs_arr as $dir1) { $count++; } +echo "*** Testing with Binary Input ***\n"; +var_dump( disk_total_space(b"$file_path") ); + echo"\n--- Done ---"; ?> --CLEAN-- <?php $file_path = dirname(__FILE__); -$dir = "/disk_total_space"; -rmdir($file_path.$dir); +rmdir($file_path."/disk_total_space"); ?> + + --EXPECTF-- *** Testing with a directory *** float(%d) @@ -68,7 +73,7 @@ float(%d) Testing for the return type *** bool(true) -*** Testing disk_total_space() function with different directory combinations *** +*** Testing with different directory combinations *** -- Iteration 1 -- float(%d) @@ -104,5 +109,7 @@ float(%d) -- Iteration 12 -- float(%d) +*** Testing with Binary Input *** +float(%d) --- Done --- |
