WordPress.org

Make WordPress Core

Changeset 44944


Ignore:
Timestamp:
03/20/2019 06:22:11 PM (4 months ago)
Author:
johnbillion
Message:

Build/Test tools: Add support for passing a WP_Error object to wp_die() during tests.

This brings the functionality inline with wp_die() during non-test usage.

Fixes #46460

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/abstract-testcase.php

    r44923 r44944  
    425425     */
    426426    public function wp_die_handler( $message ) {
     427        if ( is_wp_error( $message ) ) {
     428            $message = $message->get_error_message();
     429        }
     430
    427431        if ( ! is_scalar( $message ) ) {
    428432            $message = '0';
Note: See TracChangeset for help on using the changeset viewer.