namespace MediaWiki\Tests\Maintenance;
+use MediaWiki\MediaWikiServices;
use DumpBackup;
use ManualLogEntry;
use Title;
}
function testPlain() {
- global $wgContLang;
-
// Preparing the dump
$fname = $this->getNewTempFile();
$this->assertLogItem( $this->logId1, "BackupDumperLogUserA",
$this->userId1, null, "type", "subtype", "PageA" );
- $this->assertNotNull( $wgContLang, "Content language object validation" );
- $namespace = $wgContLang->getNsText( NS_TALK );
+ $contLang = MediaWikiServices::getInstance()->getContentLanguage();
+ $this->assertNotNull( $contLang, "Content language object validation" );
+ $namespace = $contLang->getNsText( NS_TALK );
$this->assertInternalType( 'string', $namespace );
$this->assertGreaterThan( 0, strlen( $namespace ) );
$this->assertLogItem( $this->logId2, "BackupDumperLogUserB",
}
function testXmlDumpsBackupUseCaseLogging() {
- global $wgContLang;
-
$this->checkHasGzip();
// Preparing the dump
$this->assertLogItem( $this->logId1, "BackupDumperLogUserA",
$this->userId1, null, "type", "subtype", "PageA" );
- $this->assertNotNull( $wgContLang, "Content language object validation" );
- $namespace = $wgContLang->getNsText( NS_TALK );
+ $contLang = MediaWikiServices::getInstance()->getContentLanguage();
+ $this->assertNotNull( $contLang, "Content language object validation" );
+ $namespace = $contLang->getNsText( NS_TALK );
$this->assertInternalType( 'string', $namespace );
$this->assertGreaterThan( 0, strlen( $namespace ) );
$this->assertLogItem( $this->logId2, "BackupDumperLogUserB",