Make WordPress Core

Ticket #41916: 41916.1.diff

File 41916.1.diff, 2.1 KB (added by danielbachhuber, 9 years ago)
  • tests/phpunit/includes/bootstrap.php

    diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php
    index 1450736fd1..2bbe06ac3d 100644
    a b if ( ! defined( 'WP_DEFAULT_THEME' ) ) {  
    6565}
    6666$wp_theme_directories = array( DIR_TESTDATA . '/themedir1' );
    6767
    68 system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $multisite );
     68system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $multisite, $retval );
     69if ( 0 !== $retval ) {
     70        exit( $retval );
     71}
    6972
    7073if ( $multisite ) {
    7174        echo "Running as multisite..." . PHP_EOL;
  • tests/phpunit/includes/functions.php

    diff --git a/tests/phpunit/includes/functions.php b/tests/phpunit/includes/functions.php
    index d9872fb541..928fcd912f 100644
    a b function _wp_die_handler_filter() {  
    115115        return '_wp_die_handler';
    116116}
    117117
     118function _wp_die_handler_filter_exit() {
     119        return '_wp_die_handler_exit';
     120}
     121
    118122function _wp_die_handler_txt( $message, $title, $args ) {
    119123        echo "\nwp_die called\n";
    120124        echo "Message : $message\n";
    … … function _wp_die_handler_txt( $message, $title, $args ) {  
    127131        }
    128132}
    129133
     134function _wp_die_handler_exit( $message, $title, $args ) {
     135        echo "\nwp_die called\n";
     136        echo "Message : $message\n";
     137        echo "Title : $title\n";
     138        if ( ! empty( $args ) ) {
     139                echo "Args: \n";
     140                foreach( $args as $k => $v ){
     141                        echo "\t $k : $v\n";
     142                }
     143        }
     144        exit( 1 );
     145}
     146
    130147/**
    131148 * Set a permalink structure.
    132149 *
  • tests/phpunit/includes/install.php

    diff --git a/tests/phpunit/includes/install.php b/tests/phpunit/includes/install.php
    index 38db3ce55a..7317f4e3ef 100644
    a b tests_reset__SERVER();  
    2222
    2323$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php';
    2424
     25tests_add_filter( 'wp_die_handler', '_wp_die_handler_filter_exit' );
     26
    2527require_once ABSPATH . '/wp-settings.php';
    2628
    2729require_once ABSPATH . '/wp-admin/includes/upgrade.php';