xref: /PHP-7.3/ext/standard/tests/file/disk.phpt (revision 782352c5)
1--TEST--
2disk_total_space() and disk_free_space() tests
3--INI--
4precision=14
5--SKIPIF--
6<?php
7if (substr(PHP_OS, 0, 3) == 'WIN') {
8    die('skip not for Windows');
9}
10?>
11--FILE--
12<?php
13
14var_dump(disk_free_space());
15var_dump(disk_total_space());
16
17var_dump(disk_free_space(-1));
18var_dump(disk_total_space(-1));
19
20var_dump(disk_free_space("/"));
21var_dump(disk_total_space("/"));
22
23var_dump(disk_free_space("/some/path/here"));
24var_dump(disk_total_space("/some/path/here"));
25
26echo "Done\n";
27?>
28--EXPECTF--
29Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line %d
30NULL
31
32Warning: disk_total_space() expects exactly 1 parameter, 0 given in %s on line %d
33NULL
34
35Warning: disk_free_space(): No such file or directory in %s on line %d
36bool(false)
37
38Warning: disk_total_space(): No such file or directory in %s on line %d
39bool(false)
40float(%d)
41float(%d)
42
43Warning: disk_free_space(): No such file or directory in %s on line %d
44bool(false)
45
46Warning: disk_total_space(): No such file or directory in %s on line %d
47bool(false)
48Done
49