exceptions.php 881 B

12345678910111213141516171819202122232425262728293031323334
  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. *
  11. * This means there was an error (no output, and a call to wp_die).
  12. *
  13. * @package WordPress
  14. * @subpackage Unit Tests
  15. * @since 3.4.0
  16. */
  17. class WPAjaxDieStopException extends WPDieException {}
  18. /**
  19. * Exception for cases of wp_die(), for Ajax tests.
  20. *
  21. * This means the execution of the Ajax function should be halted, but the unit test
  22. * can continue. The function finished normally and there was no error (output happened,
  23. * but wp_die was called to end execution). This is used with WP_Ajax_Response::send().
  24. *
  25. * @package WordPress
  26. * @subpackage Unit Tests
  27. * @since 3.4.0
  28. */
  29. class WPAjaxDieContinueException extends WPDieException {}