X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FMessageTest.php;h=912bffe6459a49e060d83284f30f46766273075d;hb=2ffff73a46c29cdad1cbf59063f4dd75debd3b4c;hp=424218e6e11bd6bcaab0abbbd7947f910fa05b1f;hpb=bdfa96eb726c9997a010f5a194eec71925bfddc2;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/MessageTest.php b/tests/phpunit/includes/MessageTest.php index 424218e6e1..912bffe645 100644 --- a/tests/phpunit/includes/MessageTest.php +++ b/tests/phpunit/includes/MessageTest.php @@ -1,5 +1,7 @@ assertSame( 'example &', $msg->escaped() ); } + public function testRawHtmlInMsg() { + global $wgParserConf; + $this->setMwGlobals( 'wgRawHtml', true ); + // We have to reset the core hook registration. + // to register the html hook + MessageCache::destroyInstance(); + $this->setMwGlobals( 'wgParser', + ObjectFactory::constructClassInstance( $wgParserConf['class'], [ $wgParserConf ] ) + ); + + $msg = new RawMessage( '' ); + $txt = '<html> tags cannot be' . + ' used outside of normal pages.'; + $this->assertSame( $txt, $msg->parse() ); + } + /** * @covers Message::params * @covers Message::toString