Changeset 48998
- Timestamp:
- 09/18/2020 01:53:31 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase-ajax.php
r47122 r48998 197 197 * Save the output for analysis, stop execution by throwing an exception. 198 198 * 199 * Error conditions (no output, just die) will throw <code>WPAjaxDieStopException( $message )</code> 199 * Error conditions (no output, just die) will throw <code>WPAjaxDieStopException( $message )</code>. 200 200 * You can test for this with: 201 201 * <code> 202 * $this->setExpectedException( 'WPAjaxDieStopException', 'something contained in $message' ); 202 * $this->expectException( 'WPAjaxDieStopException' ); 203 * $this->expectExceptionMessage( 'something contained in $message' ); 203 204 * </code> 204 * Normal program termination (wp_die called at then end of output) will throw <code>WPAjaxDieContinueException( $message )</code> 205 * 206 * Normal program termination (wp_die called at the end of output) will throw <code>WPAjaxDieContinueException( $message )</code>. 205 207 * You can test for this with: 206 208 * <code> 207 * $this->setExpectedException( 'WPAjaxDieContinueException', 'something contained in $message' ); 209 * $this->expectException( 'WPAjaxDieContinueException' ); 210 * $this->expectExceptionMessage( 'something contained in $message' ); 208 211 * </code> 209 212 *
Note: See TracChangeset
for help on using the changeset viewer.