From 02134236def743c508c03d5712f4cfabe8e4c2b7 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 8 Aug 2013 02:55:44 +0000 Subject: [PATCH] Tests: Avoid PHP Deprecated and Strict Standards warnings from Object references and incompatible method declarations when running under WP_DEBUG git-svn-id: https://develop.svn.wordpress.org/trunk@25017 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/includes/testcase.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 );