diff --git a/tests/includes/testcase.php b/tests/includes/testcase.php index a4e3337c82..c3fb4373df 100644 --- a/tests/includes/testcase.php +++ b/tests/includes/testcase.php @@ -129,9 +129,9 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase { $this->flush_cache(); unset($GLOBALS['wp_query'], $GLOBALS['wp_the_query']); - $GLOBALS['wp_the_query'] =& new WP_Query(); - $GLOBALS['wp_query'] =& $GLOBALS['wp_the_query']; - $GLOBALS['wp'] =& new WP(); + $GLOBALS['wp_the_query'] = new WP_Query(); + $GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; + $GLOBALS['wp'] = new WP(); // clean out globals to stop them polluting wp and wp_query foreach ($GLOBALS['wp']->public_query_vars as $v) { @@ -201,7 +201,7 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase { /** * Define constants after including files. */ - function prepareTemplate( $template ) { + function prepareTemplate( Text_Template $template ) { $template->setVar( array( 'constants' => '' ) ); $template->setVar( array( 'wp_constants' => PHPUnit_Util_GlobalState::getConstantsAsString() ) ); parent::prepareTemplate( $template );