exceptions.php 874 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. class WP_Tests_Exception extends PHPUnit_Framework_Exception {
  3. }
  4. /**
  5. * General exception for wp_die()
  6. */
  7. class WPDieException extends Exception {}
  8. /**
  9. * Exception for cases of wp_die(), for ajax tests.
  10. * This means there was an error (no output, and a call to wp_die)
  11. *
  12. * @package WordPress
  13. * @subpackage Unit Tests
  14. * @since 3.4.0
  15. */
  16. class WPAjaxDieStopException extends WPDieException {}
  17. /**
  18. * Exception for cases of wp_die(), for ajax tests.
  19. * This means execution of the ajax function should be halted, but the unit
  20. * test can continue. The function finished normally and there was not an
  21. * error (output happened, but wp_die was called to end execution) This is
  22. * used with WP_Ajax_Response::send
  23. *
  24. * @package WordPress
  25. * @subpackage Unit Tests
  26. * @since 3.4.0
  27. */
  28. class WPAjaxDieContinueException extends WPDieException {}