Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
added compatibility with PHP 5.3 ( several fixes to abstract testcase…
Browse files Browse the repository at this point in the history
… class )
  • Loading branch information
Maxim Peshkov committed Jun 18, 2014
1 parent 699ff85 commit de85ff3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/testcase.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
abstract class WP_UnitTestCase extends PHPUnit_Framework_TestCase {

function setUp() {
global $wpdb;
Expand Down Expand Up @@ -90,9 +90,9 @@ function go_to( $url ) {

$this->flush_cache();
unset($GLOBALS['wp_query'], $GLOBALS['wp_the_query']);
$GLOBALS['wp_the_query'] =& new WP_Query();
$GLOBALS['wp_the_query'] = new WP_Query();
$GLOBALS['wp_query'] =& $GLOBALS['wp_the_query'];
$GLOBALS['wp'] =& new WP();
$GLOBALS['wp'] = new WP();

// clean out globals to stop them polluting wp and wp_query
foreach ($GLOBALS['wp']->public_query_vars as $v) {
Expand Down

0 comments on commit de85ff3

Please sign in to comment.