X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FMessageTest.php;h=f99cccddb9e64e9a70b23b8364d1a72bfb2ca958;hp=424218e6e11bd6bcaab0abbbd7947f910fa05b1f;hb=cf0ebed65ad14dc9a48b0d69e0d77fc5f4f83e92;hpb=32f52cbacd760f8c1cb60345fe0310cbc8d7a4ec
diff --git a/tests/phpunit/includes/MessageTest.php b/tests/phpunit/includes/MessageTest.php
index 424218e6e1..f99cccddb9 100644
--- a/tests/phpunit/includes/MessageTest.php
+++ b/tests/phpunit/includes/MessageTest.php
@@ -1,5 +1,10 @@
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
@@ -449,7 +470,6 @@ class MessageTest extends MediaWikiLangTestCase {
/**
* FIXME: This should not need database, but Language#formatExpiry does (T57912)
- * @group Database
* @covers Message::expiryParam
* @covers Message::expiryParams
*/