ob_clean_basic_001.phpt 716 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Test ob_clean() function : basic functionality
  3. --FILE--
  4. <?php
  5. echo "*** Testing ob_clean() : basic functionality ***\n";
  6. // Zero arguments
  7. echo "\n-- Testing ob_clean() function with Zero arguments --\n";
  8. var_dump( ob_clean() );
  9. ob_start();
  10. echo "You should never see this.";
  11. var_dump(ob_clean());
  12. echo "Ensure the buffer is still active after the clean.";
  13. $out = ob_get_clean();
  14. var_dump($out);
  15. echo "Done";
  16. ?>
  17. --EXPECTF--
  18. *** Testing ob_clean() : basic functionality ***
  19. -- Testing ob_clean() function with Zero arguments --
  20. Notice: ob_clean(): Failed to delete buffer. No buffer to delete in %s on line %d
  21. bool(false)
  22. string(61) "bool(true)
  23. Ensure the buffer is still active after the clean."
  24. Done