From: Platonides Date: Sat, 27 Aug 2011 21:10:41 +0000 (+0000) Subject: Manually set the title as not being a redirect. Otherwise, X-Git-Tag: 1.31.0-rc.0~28041 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=9d98f581bb2e3b1de549d2ce1becab9a1368253a;p=lhc%2Fweb%2Fwiklou.git Manually set the title as not being a redirect. Otherwise, it needed a database from Parser::getFunctionLang() -> Title::getPageLanguage() -> Title::isRedirect() --- diff --git a/tests/phpunit/includes/parser/MagicVariableTest.php b/tests/phpunit/includes/parser/MagicVariableTest.php index f70c764a03..679a9c8633 100644 --- a/tests/phpunit/includes/parser/MagicVariableTest.php +++ b/tests/phpunit/includes/parser/MagicVariableTest.php @@ -38,8 +38,12 @@ class MagicVariableTest extends MediaWikiTestCase { # initialize parser output $this->testParser->clearState(); + # Needs a title to do magic word stuff - $this->testParser->setTitle( Title::newFromText( 'Tests' ) ); + $title = Title::newFromText( 'Tests' ); + $title->mRedirect = false; # Else it needs a db connection just to check if it's a redirect (when deciding the page language) + + $this->testParser->setTitle( $title ); } /** destroy parser (TODO: is it really neded?)*/