disk.phpt 832 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --TEST--
  2. disk_total_space() and disk_free_space() tests
  3. --INI--
  4. precision=14
  5. --SKIPIF--
  6. <?php
  7. if (substr(PHP_OS, 0, 3) == 'WIN') {
  8. die('skip not for Windows');
  9. }
  10. ?>
  11. --CONFLICTS--
  12. disk_total_space
  13. --FILE--
  14. <?php
  15. var_dump(disk_free_space(-1));
  16. var_dump(disk_total_space(-1));
  17. var_dump(disk_free_space("/"));
  18. var_dump(disk_total_space("/"));
  19. var_dump(disk_free_space("/some/path/here"));
  20. var_dump(disk_total_space("/some/path/here"));
  21. echo "Done\n";
  22. ?>
  23. --EXPECTF--
  24. Warning: disk_free_space(): No such file or directory in %s on line %d
  25. bool(false)
  26. Warning: disk_total_space(): No such file or directory in %s on line %d
  27. bool(false)
  28. float(%f)
  29. float(%f)
  30. Warning: disk_free_space(): No such file or directory in %s on line %d
  31. bool(false)
  32. Warning: disk_total_space(): No such file or directory in %s on line %d
  33. bool(false)
  34. Done