Tests: removed assignments of null to globals that are usually not null in tearDown...
authorMax Semenik <maxsem@users.mediawiki.org>
Sat, 13 Nov 2010 08:32:40 +0000 (08:32 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Sat, 13 Nov 2010 08:32:40 +0000 (08:32 +0000)
maintenance/tests/phpunit/includes/ExtraParserTest.php
maintenance/tests/phpunit/includes/LanguageConverterTest.php
maintenance/tests/phpunit/includes/TitlePermissionTest.php
maintenance/tests/phpunit/includes/api/ApiSetup.php
maintenance/tests/phpunit/includes/api/ApiUploadTest.php
maintenance/tests/phpunit/includes/search/SearchUpdateTest.php

index b95d793..f879011 100644 (file)
@@ -15,12 +15,6 @@ class ExtraParserTest extends PHPUnit_Framework_TestCase {
                $wgMemc = new FakeMemCachedClient;
        }
 
-       function tearDown() {
-               global $wgMemc;
-
-               $wgMemc = null;
-       }
-
        // Bug 8689 - Long numeric lines kill the parser
        function testBug8689() {
                global $wgLang;
index 8c53343..944195f 100644 (file)
@@ -21,7 +21,7 @@ class LanguageConverterTest extends PHPUnit_Framework_TestCase {
                unset( $wgMemc );
                unset( $this->lc );
                unset( $this->lang );
-               $wgContLang = null;
+               $wgContLang = Language::factory( 'en' );
        }
 
        function testGetPreferredVariantDefaults() {
index d24359f..9619036 100644 (file)
@@ -50,11 +50,6 @@ class TitlePermissionTest extends PHPUnit_Framework_TestCase {
                }
        }
 
-       function tearDown() {
-               global $wgContLang, $wgLang;
-               $wgContLang = $wgLang = null;
-       }
-
        function setUserPerm( $perm ) {
                if ( is_array( $perm ) ) {
                        self::$user->mRights = $perm;
index 45790d4..cbf0b27 100644 (file)
@@ -39,11 +39,6 @@ abstract class ApiTestSetup extends PHPUnit_Framework_TestCase {
                
                $GLOBALS['wgUser'] = self::$sysopUser->user;
        }
-
-       function tearDown() {
-               global $wgMemc;
-               $wgMemc = null;
-       }
 }
 
 class UserWrapper {
index a134dd3..ebfbd34 100644 (file)
@@ -108,11 +108,6 @@ abstract class ApiTestCase extends PHPUnit_Framework_TestCase {
 
        }
 
-       function tearDown() {
-               global $wgMemc;
-               $wgMemc = null;
-       }
-
        protected function doApiRequest( $params, $session = null ) {
                $_SESSION = isset( $session ) ? $session : array();
 
index 0befcd3..4555bb1 100644 (file)
@@ -91,7 +91,6 @@ class SearchUpdateTest extends PHPUnit_Framework_TestCase {
                $wgDBtype = self::$dbtype;
                $wgLBFactoryConf = self::$factoryconf;
                $wgDBservers = self::$dbservers;
-               $wgContLang = null;
        }
 
        function testUpdateText() {