WordPress.org

Make WordPress Core

Changeset 25017


Ignore:
Timestamp:
08/08/2013 02:55:44 AM (8 years ago)
Author:
dd32
Message:

Tests: Avoid PHP Deprecated and Strict Standards warnings from Object references and incompatible method declarations when running under WP_DEBUG

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/includes/testcase.php

    r25002 r25017  
    130130        $this->flush_cache();
    131131        unset($GLOBALS['wp_query'], $GLOBALS['wp_the_query']);
    132         $GLOBALS['wp_the_query'] =& new WP_Query();
    133         $GLOBALS['wp_query'] =& $GLOBALS['wp_the_query'];
    134         $GLOBALS['wp'] =& new WP();
     132        $GLOBALS['wp_the_query'] = new WP_Query();
     133        $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
     134        $GLOBALS['wp'] = new WP();
    135135
    136136        // clean out globals to stop them polluting wp and wp_query
     
    202202     * Define constants after including files.
    203203     */
    204     function prepareTemplate( $template ) {
     204    function prepareTemplate( Text_Template $template ) {
    205205        $template->setVar( array( 'constants' => '' ) );
    206206        $template->setVar( array( 'wp_constants' => PHPUnit_Util_GlobalState::getConstantsAsString() ) );
Note: See TracChangeset for help on using the changeset viewer.