Fix bootstrap in unit tests
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Fri, 3 May 2013 19:45:06 +0000 (21:45 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Fri, 3 May 2013 19:45:06 +0000 (21:45 +0200)
- Remove check for version, that version is already enforced in phpunit.php,
  so there is not point showing a warning for it is useless
- Remove call to MessageCache::destroyInstance(), there is no need for it,
  since $wgMessageCacheType is set in phpunit.php before running Setup.php
- Remove includes of bootstrap.php in LanguageSrTest.php and LanguageUzTest.php

Change-Id: I4b2db6b3e6f001175e1a407c5add2972aade5e60

tests/phpunit/bootstrap.php
tests/phpunit/languages/LanguageSrTest.php
tests/phpunit/languages/LanguageUzTest.php

index 3978b8d..ea8387c 100644 (file)
@@ -13,20 +13,3 @@ Running phpunit.php instead is recommended.
 EOF;
        require_once( __DIR__ . "/phpunit.php" );
 }
-
-// Output a notice when running with older versions of PHPUnit
-if ( version_compare( PHPUnit_Runner_Version::id(), "3.6.7", "<" ) ) {
-       echo <<<EOF
-********************************************************************************
-
-These tests run best with version PHPUnit 3.6.7 or better. Earlier versions may
-show failures because earlier versions of PHPUnit do not properly implement
-dependencies.
-
-********************************************************************************
-
-EOF;
-}
-
-/** @todo Check if this is really needed */
-MessageCache::destroyInstance();
index 11d00f3..40d14e3 100644 (file)
@@ -12,8 +12,6 @@
  * @file
  */
 
-require_once dirname( __DIR__ ) . '/bootstrap.php';
-
 /** Tests for MediaWiki languages/LanguageSr.php */
 class LanguageSrTest extends LanguageClassesTestCase {
        function testEasyConversions() {
index 495c0be..8ee95b7 100644 (file)
@@ -12,8 +12,6 @@
  * @file
  */
 
-require_once dirname( __DIR__ ) . '/bootstrap.php';
-
 /** Tests for MediaWiki languages/LanguageUz.php */
 class LanguageUzTest extends LanguageClassesTestCase {