diff options
Diffstat (limited to 'tests/phpunit/MediaWikiLangTestCase.php')
-rw-r--r-- | tests/phpunit/MediaWikiLangTestCase.php | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/tests/phpunit/MediaWikiLangTestCase.php b/tests/phpunit/MediaWikiLangTestCase.php deleted file mode 100644 index 6dd8ea35..00000000 --- a/tests/phpunit/MediaWikiLangTestCase.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * Base class that store and restore the Language objects - */ -abstract class MediaWikiLangTestCase extends MediaWikiTestCase { - private static $oldLang; - private static $oldContLang; - - public function setUp() { - global $wgLanguageCode, $wgLang, $wgContLang; - - parent::setUp(); - - self::$oldLang = $wgLang; - self::$oldContLang = $wgContLang; - - if( $wgLanguageCode != $wgContLang->getCode() ) { - throw new MWException("Error in MediaWikiLangTestCase::setUp(): " . - "\$wgLanguageCode ('$wgLanguageCode') is different from " . - "\$wgContLang->getCode() (" . $wgContLang->getCode() . ")" ); - } - - $wgLanguageCode = 'en'; # For mainpage to be 'Main Page' - - $wgContLang = $wgLang = Language::factory( $wgLanguageCode ); - MessageCache::singleton()->disable(); - - } - - public function tearDown() { - global $wgContLang, $wgLang, $wgLanguageCode; - $wgLang = self::$oldLang; - - $wgContLang = self::$oldContLang; - $wgLanguageCode = $wgContLang->getCode(); - self::$oldContLang = self::$oldLang = null; - - parent::tearDown(); - } - -} |