Index: trunk/phase3/tests/phpunit/includes/BlockTest.php |
— | — | @@ -3,17 +3,15 @@ |
4 | 4 | /** |
5 | 5 | * @group Database |
6 | 6 | */ |
7 | | -class BlockTest extends MediaWikiTestCase { |
| 7 | +class BlockTest extends MediaWikiLangTestCase { |
8 | 8 | |
9 | 9 | private $block, $madeAt; |
10 | 10 | |
11 | 11 | function setUp() { |
12 | 12 | global $wgContLang; |
| 13 | + parent::setUp(); |
13 | 14 | $wgContLang = Language::factory( 'en' ); |
14 | 15 | } |
15 | | - |
16 | | - function tearDown() { |
17 | | - } |
18 | 16 | |
19 | 17 | function addDBData() { |
20 | 18 | |
Index: trunk/phase3/tests/phpunit/includes/ArticleTablesTest.php |
— | — | @@ -4,21 +4,7 @@ |
5 | 5 | * @group Database |
6 | 6 | * @group Destructive |
7 | 7 | */ |
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 { |
23 | 9 | /** |
24 | 10 | * @group Broken |
25 | 11 | */ |
Index: trunk/phase3/tests/phpunit/includes/LocalFileTest.php |
— | — | @@ -7,9 +7,8 @@ |
8 | 8 | |
9 | 9 | class LocalFileTest extends MediaWikiTestCase { |
10 | 10 | function setUp() { |
11 | | - global $wgContLang, $wgCapitalLinks; |
| 11 | + global $wgCapitalLinks; |
12 | 12 | |
13 | | - $wgContLang = new Language; |
14 | 13 | $wgCapitalLinks = true; |
15 | 14 | $info = array( |
16 | 15 | 'name' => 'test', |
Index: trunk/phase3/tests/phpunit/includes/api/ApiSetup.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -abstract class ApiTestSetup extends MediaWikiTestCase { |
| 4 | +abstract class ApiTestSetup extends MediaWikiLangTestCase { |
5 | 5 | protected $user; |
6 | 6 | protected $sysopUser; |
7 | 7 | protected static $apiUrl; |
— | — | @@ -8,6 +8,7 @@ |
9 | 9 | function setUp() { |
10 | 10 | global $wgServer, $wgContLang, $wgAuth, $wgMemc, $wgRequest; |
11 | 11 | |
| 12 | + parent::setUp(); |
12 | 13 | self::$apiUrl = $wgServer . wfScript( 'api' ); |
13 | 14 | |
14 | 15 | $wgMemc = new EmptyBagOStuff; |
Index: trunk/phase3/tests/phpunit/includes/api/ApiTestCaseUpload.php |
— | — | @@ -20,14 +20,6 @@ |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | | - * Fixture -- run after every test |
25 | | - * Clean up temporary files etc. |
26 | | - */ |
27 | | - function tearDown() { |
28 | | - } |
29 | | - |
30 | | - |
31 | | - /** |
32 | 24 | * Helper function -- remove files and associated articles by Title |
33 | 25 | * @param $title Title: title to be removed |
34 | 26 | */ |
Index: trunk/phase3/tests/phpunit/includes/api/ApiTestCase.php |
— | — | @@ -1,11 +1,12 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -abstract class ApiTestCase extends MediaWikiTestCase { |
| 4 | +abstract class ApiTestCase extends MediaWikiLangTestCase { |
5 | 5 | public static $users; |
6 | 6 | |
7 | 7 | function setUp() { |
8 | 8 | global $wgContLang, $wgAuth, $wgMemc, $wgRequest, $wgUser; |
9 | 9 | |
| 10 | + parent::setUp(); |
10 | 11 | $wgMemc = new EmptyBagOStuff(); |
11 | 12 | $wgContLang = Language::factory( 'en' ); |
12 | 13 | $wgAuth = new StubObject( 'wgAuth', 'AuthPlugin' ); |