Tests: Ensure that the default wp_die() handler can handle a WP_Error object.

Props dd32, utkarshpatel.
Fixes #36166.

git-svn-id: https://develop.svn.wordpress.org/trunk@37071 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges
2016-03-23 19:00:38 +00:00
parent 703bd5f97f
commit 8e317daa37
2 changed files with 12 additions and 0 deletions
+4
View File
@@ -292,6 +292,10 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
}
function wp_die_handler( $message ) {
if ( ! is_scalar( $message ) ) {
$message = '0';
}
throw new WPDieException( $message );
}