summaryrefslogtreecommitdiffstatshomepage
path: root/tests/phpunit/includes/exceptions.php
diff options
context:
space:
mode:
authorAndrew Nacin <nacin@git.wordpress.org>2013-08-29 18:39:34 +0000
committerAndrew Nacin <nacin@git.wordpress.org>2013-08-29 18:39:34 +0000
commit8045afd81b7c80f6ef5b327c115a5bbb43e4b65c (patch)
tree15d457007610c451577debda89bd9e9cd3d74551 /tests/phpunit/includes/exceptions.php
parentd34baebc1d8111c9c1014e11001957face778e52 (diff)
downloadwordpress-8045afd81b7c80f6ef5b327c115a5bbb43e4b65c.tar.gz
wordpress-8045afd81b7c80f6ef5b327c115a5bbb43e4b65c.zip
Move PHPUnit tests into a tests/phpunit directory.
wp-tests-config.php can/should reside in the root of a develop checkout. `phpunit` should be run from the root. see #25088. git-svn-id: https://develop.svn.wordpress.org/trunk@25165 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'tests/phpunit/includes/exceptions.php')
-rw-r--r--tests/phpunit/includes/exceptions.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/phpunit/includes/exceptions.php b/tests/phpunit/includes/exceptions.php
new file mode 100644
index 0000000000..50976fb0b3
--- /dev/null
+++ b/tests/phpunit/includes/exceptions.php
@@ -0,0 +1,33 @@
+<?php
+
+class WP_Tests_Exception extends PHPUnit_Framework_Exception {
+
+}
+
+/**
+ * General exception for wp_die()
+ */
+class WPDieException extends Exception {}
+
+/**
+ * Exception for cases of wp_die(), for ajax tests.
+ * This means there was an error (no output, and a call to wp_die)
+ *
+ * @package WordPress
+ * @subpackage Unit Tests
+ * @since 3.4.0
+ */
+class WPAjaxDieStopException extends WPDieException {}
+
+/**
+ * Exception for cases of wp_die(), for ajax tests.
+ * This means execution of the ajax function should be halted, but the unit
+ * test can continue. The function finished normally and there was not an
+ * error (output happened, but wp_die was called to end execution) This is
+ * used with WP_Ajax_Response::send
+ *
+ * @package WordPress
+ * @subpackage Unit Tests
+ * @since 3.4.0
+ */
+class WPAjaxDieContinueException extends WPDieException {}