include_path.phpt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. --TEST--
  2. *_include_path() tests
  3. --INI--
  4. include_path=.
  5. --FILE--
  6. <?php
  7. var_dump(get_include_path());
  8. var_dump(get_include_path("var"));
  9. var_dump(restore_include_path());
  10. var_dump(restore_include_path(""));
  11. var_dump(set_include_path());
  12. var_dump(get_include_path());
  13. var_dump(set_include_path("var"));
  14. var_dump(get_include_path());
  15. var_dump(restore_include_path());
  16. var_dump(get_include_path());
  17. var_dump(set_include_path(".:/path/to/dir"));
  18. var_dump(get_include_path());
  19. var_dump(restore_include_path());
  20. var_dump(get_include_path());
  21. var_dump(set_include_path(""));
  22. var_dump(get_include_path());
  23. var_dump(restore_include_path());
  24. var_dump(get_include_path());
  25. var_dump(set_include_path(array()));
  26. var_dump(get_include_path());
  27. var_dump(restore_include_path());
  28. var_dump(get_include_path());
  29. echo "Done\n";
  30. ?>
  31. --EXPECTF--
  32. string(1) "."
  33. Warning: get_include_path() expects exactly 0 parameters, 1 given in %s on line %d
  34. NULL
  35. NULL
  36. Warning: restore_include_path() expects exactly 0 parameters, 1 given in %s on line %d
  37. NULL
  38. Warning: set_include_path() expects exactly 1 parameter, 0 given in %s on line %d
  39. NULL
  40. string(1) "."
  41. string(1) "."
  42. string(3) "var"
  43. NULL
  44. string(1) "."
  45. string(1) "."
  46. string(14) ".:/path/to/dir"
  47. NULL
  48. string(1) "."
  49. bool(false)
  50. string(1) "."
  51. NULL
  52. string(1) "."
  53. Warning: set_include_path() expects parameter 1 to be a valid path, array given in %s on line %d
  54. NULL
  55. string(1) "."
  56. NULL
  57. string(1) "."
  58. Done