From 33459ee8891b62a78aecd874c46f31bc2e0f31ee Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 30 Jul 2009 15:59:04 +0000 Subject: [PATCH] fixes in the tests directory: * create default object to avoid PHP notices in ArticleTest * remove broken constructor in SearchMySQL4Test * remove pass by ref to avoid PHP warnings in SearchEngineTest --- tests/ArticleTest.php | 2 ++ tests/SearchEngineTest.php | 2 +- tests/SearchMySQL4Test.php | 4 ---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/ArticleTest.php b/tests/ArticleTest.php index a65e1ee345..f36b0262a2 100644 --- a/tests/ArticleTest.php +++ b/tests/ArticleTest.php @@ -80,6 +80,7 @@ class ArticleTest extends PHPUnit_Framework_TestCase { } function testCompressRevisionTextUtf8() { + $row = new stdClass; $row->old_text = "Wiki est l'\xc3\xa9cole superieur !"; $row->old_flags = Revision::compressRevisionText( $row->old_text ); $this->assertTrue( false !== strpos( $row->old_flags, 'utf-8' ), @@ -94,6 +95,7 @@ class ArticleTest extends PHPUnit_Framework_TestCase { function testCompressRevisionTextUtf8Gzip() { $GLOBALS['wgCompressRevisions'] = true; + $row = new stdClass; $row->old_text = "Wiki est l'\xc3\xa9cole superieur !"; $row->old_flags = Revision::compressRevisionText( $row->old_text ); $this->assertTrue( false !== strpos( $row->old_flags, 'utf-8' ), diff --git a/tests/SearchEngineTest.php b/tests/SearchEngineTest.php index 0ae14bddbf..173260050c 100644 --- a/tests/SearchEngineTest.php +++ b/tests/SearchEngineTest.php @@ -65,7 +65,7 @@ END , $this->db->tableName( 'searchindex' ) ); } - function fetchIds( &$results ) { + function fetchIds( $results ) { $matches = array(); while( $row = $results->next() ) { $matches[] = $row->getTitle()->getPrefixedText(); diff --git a/tests/SearchMySQL4Test.php b/tests/SearchMySQL4Test.php index 0f3a4c2c74..4fe4d5440c 100644 --- a/tests/SearchMySQL4Test.php +++ b/tests/SearchMySQL4Test.php @@ -4,10 +4,6 @@ require_once( 'SearchEngineTest.php' ); class SearchMySQL4Test extends SearchEngineTest { var $db; - function __construct( $name ) { - parent::__construct( $name ); - } - function setUp() { $GLOBALS['wgContLang'] = new Language; $this->db = $this->buildTestDatabase( -- 2.20.1