CommentStore: Hard-deprecate newKey()
[lhc/web/wiklou.git] / tests / phpunit / includes / MessageTest.php
index 3e3d04a..d75c0e5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-use Wikimedia\ObjectFactory;
+use MediaWiki\MediaWikiServices;
 use Wikimedia\TestingAccessWrapper;
 
 /**
@@ -401,14 +401,12 @@ class MessageTest extends MediaWikiLangTestCase {
        }
 
        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 ] )
-               );
+                       MediaWikiServices::getInstance()->getParserFactory()->create() );
 
                $msg = new RawMessage( '<html><script>alert("xss")</script></html>' );
                $txt = '<span class="error">&lt;html&gt; tags cannot be' .