Index: trunk/phase3/tests/phpunit/includes/ExtraParserTest.php |
— | — | @@ -41,11 +41,13 @@ |
42 | 42 | } |
43 | 43 | |
44 | 44 | function testPreSaveTransform() { |
45 | | - global $wgUser; |
| 45 | + global $wgUser, $wgTitle; |
46 | 46 | $title = Title::newFromText( __FUNCTION__ ); |
| 47 | + $oldTitle = $wgTitle; $wgTitle = $title; # Used by transformMsg() |
47 | 48 | $outputText = $this->parser->preSaveTransform( "Test\r\n{{subst:Foo}}\n{{Bar}}", $title, $wgUser, $this->options ); |
48 | | - |
| 49 | + |
49 | 50 | $this->assertEquals( "Test\nContent of ''Template:Foo''\n{{Bar}}", $outputText ); |
| 51 | + $wgTitle = $oldTitle; |
50 | 52 | } |
51 | 53 | |
52 | 54 | function testPreprocess() { |