r95609 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95608‎ | r95609 | r95610 >
Date:21:10, 27 August 2011
Author:platonides
Status:ok
Tags:
Comment:
Manually set the title as not being a redirect. Otherwise,
it needed a database from Parser::getFunctionLang() ->
Title::getPageLanguage() -> Title::isRedirect()
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/parser/MagicVariableTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/parser/MagicVariableTest.php
@@ -38,8 +38,12 @@
3939
4040 # initialize parser output
4141 $this->testParser->clearState();
 42+
4243 # Needs a title to do magic word stuff
43 - $this->testParser->setTitle( Title::newFromText( 'Tests' ) );
 44+ $title = Title::newFromText( 'Tests' );
 45+ $title->mRedirect = false; # Else it needs a db connection just to check if it's a redirect (when deciding the page language)
 46+
 47+ $this->testParser->setTitle( $title );
4448 }
4549
4650 /** destroy parser (TODO: is it really neded?)*/

Status & tagging log