X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FMessageTest.php;h=912bffe6459a49e060d83284f30f46766273075d;hb=eb04b990fedf02de878a73b7c40de9e60a1fa2fc;hp=424218e6e11bd6bcaab0abbbd7947f910fa05b1f;hpb=82524dc4da650c8017767a2648ed92dde98b8cae;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