r87229 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87228‎ | r87229 | r87230 >
Date:23:02, 1 May 2011
Author:platonides
Status:ok
Tags:
Comment:
Follow up r87210
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/ArticleTablesTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/BlockTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/LocalFileTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/api/ApiSetup.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/api/ApiTestCase.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/api/ApiTestCaseUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/BlockTest.php
@@ -3,17 +3,15 @@
44 /**
55 * @group Database
66 */
7 -class BlockTest extends MediaWikiTestCase {
 7+class BlockTest extends MediaWikiLangTestCase {
88
99 private $block, $madeAt;
1010
1111 function setUp() {
1212 global $wgContLang;
 13+ parent::setUp();
1314 $wgContLang = Language::factory( 'en' );
1415 }
15 -
16 - function tearDown() {
17 - }
1816
1917 function addDBData() {
2018
Index: trunk/phase3/tests/phpunit/includes/ArticleTablesTest.php
@@ -4,21 +4,7 @@
55 * @group Database
66 * @group Destructive
77 */
8 -class ArticleTablesTest extends MediaWikiTestCase {
9 -
10 - function setUp() {
11 - global $wgLanguageCode;
12 -
13 - $this->languageCode = $wgLanguageCode;
14 - }
15 -
16 - function tearDown() {
17 - global $wgLanguageCode, $wgContLang, $wgLang;
18 - $wgLanguageCode = $this->languageCode;
19 - $wgContLang = Language::factory( $wgLanguageCode );
20 - $wgLang = new StubUserLang;
21 - }
22 -
 8+class ArticleTablesTest extends MediaWikiLangTestCase {
239 /**
2410 * @group Broken
2511 */
Index: trunk/phase3/tests/phpunit/includes/LocalFileTest.php
@@ -7,9 +7,8 @@
88
99 class LocalFileTest extends MediaWikiTestCase {
1010 function setUp() {
11 - global $wgContLang, $wgCapitalLinks;
 11+ global $wgCapitalLinks;
1212
13 - $wgContLang = new Language;
1413 $wgCapitalLinks = true;
1514 $info = array(
1615 'name' => 'test',
Index: trunk/phase3/tests/phpunit/includes/api/ApiSetup.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -abstract class ApiTestSetup extends MediaWikiTestCase {
 4+abstract class ApiTestSetup extends MediaWikiLangTestCase {
55 protected $user;
66 protected $sysopUser;
77 protected static $apiUrl;
@@ -8,6 +8,7 @@
99 function setUp() {
1010 global $wgServer, $wgContLang, $wgAuth, $wgMemc, $wgRequest;
1111
 12+ parent::setUp();
1213 self::$apiUrl = $wgServer . wfScript( 'api' );
1314
1415 $wgMemc = new EmptyBagOStuff;
Index: trunk/phase3/tests/phpunit/includes/api/ApiTestCaseUpload.php
@@ -20,14 +20,6 @@
2121 }
2222
2323 /**
24 - * Fixture -- run after every test
25 - * Clean up temporary files etc.
26 - */
27 - function tearDown() {
28 - }
29 -
30 -
31 - /**
3224 * Helper function -- remove files and associated articles by Title
3325 * @param $title Title: title to be removed
3426 */
Index: trunk/phase3/tests/phpunit/includes/api/ApiTestCase.php
@@ -1,11 +1,12 @@
22 <?php
33
4 -abstract class ApiTestCase extends MediaWikiTestCase {
 4+abstract class ApiTestCase extends MediaWikiLangTestCase {
55 public static $users;
66
77 function setUp() {
88 global $wgContLang, $wgAuth, $wgMemc, $wgRequest, $wgUser;
99
 10+ parent::setUp();
1011 $wgMemc = new EmptyBagOStuff();
1112 $wgContLang = Language::factory( 'en' );
1213 $wgAuth = new StubObject( 'wgAuth', 'AuthPlugin' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87210Fix the old XmlTest.php test bug in the dateMenu() when the wiki is configure...platonides19:32, 1 May 2011

Status & tagging log