mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
6295079d77
Change-Id: I928dc450adb149e4a4a2260482b148c5cd1670c1
34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Tests;
|
|
|
|
use MediaWiki\MainConfigNames;
|
|
use MediaWikiIntegrationTestCase;
|
|
|
|
abstract class IntegrationTestCase extends MediaWikiIntegrationTestCase {
|
|
|
|
use TestUtils;
|
|
|
|
/**
|
|
* Setup the MW environment
|
|
*
|
|
* @param array $config
|
|
* @param array $data
|
|
*/
|
|
protected function setupEnv( array $config, array $data ): void {
|
|
$this->overrideConfigValues( [
|
|
MainConfigNames::NamespaceAliases => $config['wgNamespaceIds'],
|
|
MainConfigNames::MetaNamespace => strtr( $config['wgFormattedNamespaces'][NS_PROJECT], ' ', '_' ),
|
|
MainConfigNames::MetaNamespaceTalk =>
|
|
strtr( $config['wgFormattedNamespaces'][NS_PROJECT_TALK], ' ', '_' ),
|
|
// TODO: Move this to $config
|
|
MainConfigNames::Localtimezone => $data['localTimezone'],
|
|
// Data used for the tests assumes there are no variants for English.
|
|
// Language variants are tested using other languages.
|
|
MainConfigNames::UsePigLatinVariant => false,
|
|
] + $config );
|
|
$this->setUserLang( $config['wgContentLanguage'] );
|
|
$this->setContentLang( $config['wgContentLanguage'] );
|
|
}
|
|
}
|