mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-18 19:12:16 +00:00
f68f91e883
Data used for the tests assumes there are no variants for English, and some tests fail when there are. Correct behavior with language variants is tested using other languages. Change-Id: I348a0ba0389c2a18644ce5e05c7f37d8f26a8c55
34 lines
1 KiB
PHP
34 lines
1 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Tests;
|
|
|
|
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->setMwGlobals( $config );
|
|
$this->setMwGlobals( [
|
|
'wgArticlePath' => $config['wgArticlePath'],
|
|
'wgNamespaceAliases' => $config['wgNamespaceIds'],
|
|
'wgMetaNamespace' => strtr( $config['wgFormattedNamespaces'][NS_PROJECT], ' ', '_' ),
|
|
'wgMetaNamespaceTalk' => strtr( $config['wgFormattedNamespaces'][NS_PROJECT_TALK], ' ', '_' ),
|
|
// TODO: Move this to $config
|
|
'wgLocaltimezone' => $data['localTimezone'],
|
|
// Data used for the tests assumes there are no variants for English.
|
|
// Language variants are tested using other languages.
|
|
'wgUsePigLatinVariant' => false,
|
|
] );
|
|
$this->setUserLang( $config['wgContentLanguage'] );
|
|
$this->setContentLang( $config['wgContentLanguage'] );
|
|
}
|
|
}
|