Merge "Add type hint for ParserOutput"
[lhc/web/wiklou.git] / tests / phpunit / includes / content / ContentHandlerTest.php
index 9a1c90f..323a63d 100644 (file)
@@ -8,7 +8,6 @@ use MediaWiki\MediaWikiServices;
 class ContentHandlerTest extends MediaWikiTestCase {
 
        protected function setUp() {
-               global $wgContLang;
                parent::setUp();
 
                $this->setMwGlobals( [
@@ -34,20 +33,12 @@ class ContentHandlerTest extends MediaWikiTestCase {
                        ],
                ] );
 
-               // Reset namespace cache
-               MWNamespace::clearCaches();
-               $wgContLang->resetNamespaces();
-               // And LinkCache
+               // Reset LinkCache
                MediaWikiServices::getInstance()->resetServiceForTesting( 'LinkCache' );
        }
 
        protected function tearDown() {
-               global $wgContLang;
-
-               // Reset namespace cache
-               MWNamespace::clearCaches();
-               $wgContLang->resetNamespaces();
-               // And LinkCache
+               // Reset LinkCache
                MediaWikiServices::getInstance()->resetServiceForTesting( 'LinkCache' );
 
                parent::tearDown();
@@ -335,7 +326,7 @@ class ContentHandlerTest extends MediaWikiTestCase {
         * page.
         */
        public function testGetAutosummary() {
-               $this->setMwGlobals( 'wgContLang', Language::factory( 'en' ) );
+               $this->setContentLang( 'en' );
 
                $content = new DummyContentHandlerForTesting( CONTENT_MODEL_WIKITEXT );
                $title = Title::newFromText( 'Help:Test' );