mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 16:34:21 +00:00
0935bb1271
MediaWikiTestCase has been renamed to MediaWikiIntegrationTestCase in 1.34. Bug: T293043 Change-Id: I485c5c5f0376ab60cdec49e934c6e7eea8c9feb5
31 lines
897 B
PHP
31 lines
897 B
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']
|
|
] );
|
|
$this->setUserLang( $config['wgContentLanguage'] );
|
|
$this->setContentLang( $config['wgContentLanguage'] );
|
|
}
|
|
}
|