mediawiki-extensions-Discus.../tests/phpunit/IntegrationTestCase.php
Alexander Vorwerk 0935bb1271 MediaWikiTestCase -> MediaWikiIntegrationTestCase
MediaWikiTestCase has been renamed to MediaWikiIntegrationTestCase in 1.34.

Bug: T293043
Change-Id: I485c5c5f0376ab60cdec49e934c6e7eea8c9feb5
2021-10-12 00:40:27 +02:00

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'] );
}
}