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
This commit is contained in:
parent
37c3399a0c
commit
02134236de
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user