r80976 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80975‎ | r80976 | r80977 >
Date:18:09, 25 January 2011
Author:daniel
Status:deferred (Comments)
Tags:
Comment:
fix test failure caused by double-escaping in the parser. I have *no* ideal *why* this change fixes that problem. Anyone who can tell me where the double-escaping happens gets a cookie.
Modified paths:
  • /trunk/extensions/DataTransclusion/tests/DataTransclusionTest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DataTransclusion/tests/DataTransclusionTest.php
@@ -46,12 +46,16 @@
4747 return Parser::statelessFetchTemplate( $title, $parser );
4848 }
4949 }
 50+
 51+ static function setUpBeforeClass() {
 52+ global $wgTitle, $wgParser;
 53+ $wgTitle = Title::newFromText( "Test" );
 54+ }
5055
5156 function setUp() {
5257 global $wgTitle, $wgParser;
5358
54 - $wgTitle = Title::newFromText( "Test" );
55 -
 59+ $wgParser = new Parser();
5660 $wgParser->Options( new ParserOptions() );
5761 $wgParser->clearState();
5862 $wgParser->setTitle( $wgTitle );
@@ -493,6 +497,7 @@
494498 if ( !defined('MW_PHPUNIT_TEST') ) {
495499 $wgShowExceptionDetails = true;
496500
 501+ DataTransclusionTest::setUpBeforeClass();
497502 $t = new DataTransclusionTest();
498503 $t->setUp();
499504

Comments

#Comment by Platonides (talk | contribs)   15:53, 8 February 2011

I think you should be using $this->parser instead of $wgParser

Status & tagging log