<?php
-use Wikimedia\ObjectFactory;
+use MediaWiki\MediaWikiServices;
use Wikimedia\TestingAccessWrapper;
/**
$this->assertSame( 'example &', $msg->escaped() );
}
+ /**
+ * @covers CoreTagHooks::html
+ */
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"><html> tags cannot be' .