From 675cc960a8dde8d67a9556c2e03c842d55cc6985 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 15 Oct 2014 18:05:57 +0200 Subject: [PATCH] Use mergeMwGlobalArrayValue in AutoLoaderTest::setUp Change-Id: Ieb7835855a28d1602ac357b51197cb66d9200209 --- tests/phpunit/structure/AutoLoaderTest.php | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/tests/phpunit/structure/AutoLoaderTest.php b/tests/phpunit/structure/AutoLoaderTest.php index 2bdc9c9a22..2142061896 100644 --- a/tests/phpunit/structure/AutoLoaderTest.php +++ b/tests/phpunit/structure/AutoLoaderTest.php @@ -2,27 +2,22 @@ class AutoLoaderTest extends MediaWikiTestCase { protected function setUp() { - global $wgAutoloadLocalClasses, $wgAutoloadClasses; - parent::setUp(); // Fancy dance to trigger a rebuild of AutoLoader::$autoloadLocalClassesLower - $this->testLocalClasses = array( - 'TestAutoloadedLocalClass' => __DIR__ . '/../data/autoloader/TestAutoloadedLocalClass.php', - 'TestAutoloadedCamlClass' => __DIR__ . '/../data/autoloader/TestAutoloadedCamlClass.php', + $this->mergeMwGlobalArrayValue( 'wgAutoloadLocalClasses', array( + 'TestAutoloadedLocalClass' => + __DIR__ . '/../data/autoloader/TestAutoloadedLocalClass.php', + 'TestAutoloadedCamlClass' => + __DIR__ . '/../data/autoloader/TestAutoloadedCamlClass.php', 'TestAutoloadedSerializedClass' => __DIR__ . '/../data/autoloader/TestAutoloadedSerializedClass.php', - ); - $this->setMwGlobals( - 'wgAutoloadLocalClasses', - $this->testLocalClasses + $wgAutoloadLocalClasses - ); + ) ); AutoLoader::resetAutoloadLocalClassesLower(); - $this->testExtensionClasses = array( + $this->mergeMwGlobalArrayValue( 'wgAutoloadClasses', array( 'TestAutoloadedClass' => __DIR__ . '/../data/autoloader/TestAutoloadedClass.php', - ); - $this->setMwGlobals( 'wgAutoloadClasses', $this->testExtensionClasses + $wgAutoloadClasses ); + ) ); } /** -- 2.20.1