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