ob_flush_basic_001.phpt 734 B

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