Make WordPress Core

Ticket #28692: 28692.2.diff

File 28692.2.diff, 1001 bytes (added by jeremyfelt, 10 years ago)
  • tests/phpunit/includes/testcase.php

     
    3535                global $wpdb, $wp_query, $post;
    3636                $this->expectedDeprecated();
    3737                $wpdb->query( 'ROLLBACK' );
     38                if ( is_multisite() ) {
     39                        while ( ms_is_switched() ) {
     40                                restore_current_blog();
     41                        }
     42                }
    3843                $wp_query = new WP_Query();
    3944                $post = null;
    4045                remove_theme_support( 'html5' );
  • tests/phpunit/tests/ms.php

     
    15121512        function _setup_host_request( $domain, $path ) {
    15131513                global $current_site, $current_blog, $wpdb, $table_prefix;
    15141514
     1515                $table_prefix = 'wptests_';
    15151516                $current_site = $current_blog = null;
    15161517                $_SERVER['HTTP_HOST'] = $domain;
    15171518                $_SERVER['REQUEST_URI'] = $path;