From fe7ee51f3cf6a25bf74d46f57391cfe65774eb29 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sun, 1 May 2011 23:02:27 +0000 Subject: [PATCH] Follow up r87210 --- tests/phpunit/includes/ArticleTablesTest.php | 16 +--------------- tests/phpunit/includes/BlockTest.php | 6 ++---- tests/phpunit/includes/LocalFileTest.php | 3 +-- tests/phpunit/includes/api/ApiSetup.php | 3 ++- tests/phpunit/includes/api/ApiTestCase.php | 3 ++- tests/phpunit/includes/api/ApiTestCaseUpload.php | 8 -------- 6 files changed, 8 insertions(+), 31 deletions(-) diff --git a/tests/phpunit/includes/ArticleTablesTest.php b/tests/phpunit/includes/ArticleTablesTest.php index 6d7d05a224..1caf5871af 100644 --- a/tests/phpunit/includes/ArticleTablesTest.php +++ b/tests/phpunit/includes/ArticleTablesTest.php @@ -4,21 +4,7 @@ * @group Database * @group Destructive */ -class ArticleTablesTest extends MediaWikiTestCase { - - function setUp() { - global $wgLanguageCode; - - $this->languageCode = $wgLanguageCode; - } - - function tearDown() { - global $wgLanguageCode, $wgContLang, $wgLang; - $wgLanguageCode = $this->languageCode; - $wgContLang = Language::factory( $wgLanguageCode ); - $wgLang = new StubUserLang; - } - +class ArticleTablesTest extends MediaWikiLangTestCase { /** * @group Broken */ diff --git a/tests/phpunit/includes/BlockTest.php b/tests/phpunit/includes/BlockTest.php index 362c9ec7e3..278dd92767 100644 --- a/tests/phpunit/includes/BlockTest.php +++ b/tests/phpunit/includes/BlockTest.php @@ -3,17 +3,15 @@ /** * @group Database */ -class BlockTest extends MediaWikiTestCase { +class BlockTest extends MediaWikiLangTestCase { private $block, $madeAt; function setUp() { global $wgContLang; + parent::setUp(); $wgContLang = Language::factory( 'en' ); } - - function tearDown() { - } function addDBData() { diff --git a/tests/phpunit/includes/LocalFileTest.php b/tests/phpunit/includes/LocalFileTest.php index 98c0de5328..e08d4d7e42 100644 --- a/tests/phpunit/includes/LocalFileTest.php +++ b/tests/phpunit/includes/LocalFileTest.php @@ -7,9 +7,8 @@ class LocalFileTest extends MediaWikiTestCase { function setUp() { - global $wgContLang, $wgCapitalLinks; + global $wgCapitalLinks; - $wgContLang = new Language; $wgCapitalLinks = true; $info = array( 'name' => 'test', diff --git a/tests/phpunit/includes/api/ApiSetup.php b/tests/phpunit/includes/api/ApiSetup.php index 1c8001e8b2..7672faab9c 100644 --- a/tests/phpunit/includes/api/ApiSetup.php +++ b/tests/phpunit/includes/api/ApiSetup.php @@ -1,6 +1,6 @@ clearFakeUploads(); } - /** - * Fixture -- run after every test - * Clean up temporary files etc. - */ - function tearDown() { - } - - /** * Helper function -- remove files and associated articles by Title * @param $title Title: title to be removed -- 2.20.1