tests: Don't set wgStyleSheetPath in addition to wgStylePath
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 7 May 2013 23:32:21 +0000 (01:32 +0200)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 8 May 2013 00:04:38 +0000 (00:04 +0000)
Because 1) `$wgStyleSheetPath = &$wgStylePath;` in default
settings, so setting one sets the other. No need to set both
and 2) in wmf-branches this variable is unset, thus this
caused an E_NOTICE internally when Test::setMwGlobals is
trying to access it to preserve the current value,
and 3) wgStyleSheetPath is deprecated.

Follows-up I1362932db223.

Change-Id: Ibd3f28e460fef995f68dfe1292d25fb75950dcf5

tests/parser/parserTest.inc
tests/phpunit/includes/parser/NewParserTest.php
tests/phpunit/suites/UploadFromUrlTestSuite.php

index a0ede09..972ad8f 100644 (file)
@@ -143,13 +143,12 @@ class ParserTest {
                        $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
                        $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
                        $parserMemc, $wgThumbnailScriptPath, $wgScriptPath,
-                       $wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath, $wgExtensionAssetsPath,
+                       $wgArticlePath, $wgScript, $wgStylePath, $wgExtensionAssetsPath,
                        $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgLockManagers;
 
                $wgScript = '/index.php';
                $wgScriptPath = '/';
                $wgArticlePath = '/wiki/$1';
-               $wgStyleSheetPath = '/skins';
                $wgStylePath = '/skins';
                $wgExtensionAssetsPath = '/extensions';
                $wgThumbnailScriptPath = false;
@@ -669,7 +668,6 @@ class ParserTest {
                        ),
                        'wgEnableUploads' => self::getOptionValue( 'wgEnableUploads', $opts, true ),
                        'wgStylePath' => '/skins',
-                       'wgStyleSheetPath' => '/skins',
                        'wgSitename' => 'MediaWiki',
                        'wgLanguageCode' => $lang,
                        'wgDBprefix' => $this->db->getType() != 'oracle' ? 'parsertest_' : 'pt_',
index 3449cc7..d66fac7 100644 (file)
@@ -59,7 +59,6 @@ class NewParserTest extends MediaWikiTestCase {
                $tmpGlobals['wgActionPaths'] = array();
                $tmpGlobals['wgVariantArticlePath'] = false;
                $tmpGlobals['wgExtensionAssetsPath'] = '/extensions';
-               $tmpGlobals['wgStyleSheetPath'] = '/skins';
                $tmpGlobals['wgStylePath'] = '/skins';
                $tmpGlobals['wgEnableUploads'] = true;
                $tmpGlobals['wgThumbnailScriptPath'] = false;
index b1496a9..670c934 100644 (file)
@@ -26,7 +26,6 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
                $tmpGlobals['wgScript'] = '/index.php';
                $tmpGlobals['wgScriptPath'] = '/';
                $tmpGlobals['wgArticlePath'] = '/wiki/$1';
-               $tmpGlobals['wgStyleSheetPath'] = '/skins';
                $tmpGlobals['wgStylePath'] = '/skins';
                $tmpGlobals['wgThumbnailScriptPath'] = false;
                $tmpGlobals['wgLocalFileRepo'] = array(