From 53ee1cefcf75932e8e47b46389eb2f8f2b1bf9bb Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 8 May 2013 01:32:21 +0200 Subject: [PATCH] tests: Don't set wgStyleSheetPath in addition to wgStylePath 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 | 4 +--- tests/phpunit/includes/parser/NewParserTest.php | 1 - tests/phpunit/suites/UploadFromUrlTestSuite.php | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index a0ede097a8..972ad8f2c8 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -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_', diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 3449cc73c0..d66fac77f1 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -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; diff --git a/tests/phpunit/suites/UploadFromUrlTestSuite.php b/tests/phpunit/suites/UploadFromUrlTestSuite.php index b1496a9cfe..670c934234 100644 --- a/tests/phpunit/suites/UploadFromUrlTestSuite.php +++ b/tests/phpunit/suites/UploadFromUrlTestSuite.php @@ -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( -- 2.20.1