session_save_path_basic.phpt 734 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. Test session_save_path() function : basic functionality
  3. --INI--
  4. session.gc_probability=0
  5. session.save_path=
  6. session.name=PHPSESSID
  7. --SKIPIF--
  8. <?php include('skipif.inc'); ?>
  9. --FILE--
  10. <?php
  11. ob_start();
  12. /*
  13. * Prototype : string session_save_path([string $path])
  14. * Description : Get and/or set the current session save path
  15. * Source code : ext/session/session.c
  16. */
  17. echo "*** Testing session_save_path() : error functionality ***\n";
  18. $directory = dirname(__FILE__);
  19. var_dump(session_save_path());
  20. var_dump(session_save_path($directory));
  21. var_dump(session_save_path());
  22. echo "Done";
  23. ob_end_flush();
  24. ?>
  25. --EXPECTF--
  26. *** Testing session_save_path() : error functionality ***
  27. string(0) ""
  28. string(0) ""
  29. string(%d) "%s"
  30. Done