WPAjaxDieStopException( $message )
You can test for this with:
$this->setExpectedException( 'WPAjaxDieStopException', 'something contained in $message' );
Normal program termination (wp_die called at then end of output) will throw WPAjaxDieContinueException( $message )
You can test for this with:
$this->setExpectedException( 'WPAjaxDieContinueException', 'something contained in $message' );
public dieHandler ( string $message ) | ||
$message | string |
public function dieHandler($message)
{
$this->_last_response .= ob_get_clean();
if ('' === $this->_last_response) {
if (is_scalar($message)) {
throw new WPAjaxDieStopException((string) $message);
} else {
throw new WPAjaxDieStopException('0');
}
} else {
throw new WPAjaxDieContinueException($message);
}
}