1--TEST--
2Test disk_total_space() function : basic functionality
3--CONFLICTS--
4disk_total_space
5--FILE--
6<?php
7$file_path = __DIR__;
8
9echo "*** Testing with normal directory ***\n";
10var_dump( disk_total_space($file_path) );
11
12echo "*** Testing with newly created directory ***\n";
13$dir = "/disk_total_space";
14
15mkdir($file_path.$dir);
16var_dump( disk_total_space($file_path.$dir) );
17$fh = fopen($file_path.$dir."/disk_total_space.tmp", "w");
18fwrite($fh, "Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data");
19
20fclose($fh);
21
22echo"\nTotal Space after writing to a file\n";
23var_dump( disk_total_space($file_path.$dir) );
24
25echo"\n-- Done --";
26?>
27--CLEAN--
28<?php
29$file_path = __DIR__;
30unlink($file_path."/disk_total_space/disk_total_space.tmp");
31rmdir($file_path."/disk_total_space");
32?>
33--EXPECTF--
34*** Testing with normal directory ***
35float(%f)
36*** Testing with newly created directory ***
37float(%f)
38
39Total Space after writing to a file
40float(%f)
41
42-- Done --
43