<?php
+use MediaWiki\MediaWikiServices;
+
/**
* @group ContentHandler
* @group Database
class TitleMethodsTest extends MediaWikiLangTestCase {
protected function setUp() {
- global $wgContLang;
-
parent::setUp();
$this->mergeMwGlobalArrayValue(
12302 => CONTENT_MODEL_JAVASCRIPT,
]
);
-
- MWNamespace::clearCaches();
- $wgContLang->resetNamespaces(); # reset namespace cache
- }
-
- protected function tearDown() {
- global $wgContLang;
-
- parent::tearDown();
-
- MWNamespace::clearCaches();
- $wgContLang->resetNamespaces(); # reset namespace cache
}
public static function provideEquals() {
* @covers Title::clearCaches
*/
public function testClearCaches() {
- $linkCache = LinkCache::singleton();
+ $linkCache = MediaWikiServices::getInstance()->getLinkCache();
$title1 = Title::newFromText( 'Foo' );
$linkCache->addGoodLinkObj( 23, $title1 );