Fix global variable name typo in LocalIdLookupTest.php
authorAlangi Derick <alangiderick@gmail.com>
Tue, 27 Nov 2018 15:47:07 +0000 (16:47 +0100)
committerD3r1ck01 <alangiderick@gmail.com>
Tue, 27 Nov 2018 19:47:29 +0000 (19:47 +0000)
Per @Thiemo and @Anomie's comments on the patch, droppping dependency
of the test value to not be a global, using "dummy" in this case.

Bug: T210512
Change-Id: I26aff5fe4782837a8f52a102ae1bdbac49b748bc

tests/phpunit/includes/user/LocalIdLookupTest.php

index 6ce01ca..58441f0 100644 (file)
@@ -124,9 +124,8 @@ class LocalIdLookupTest extends MediaWikiTestCase {
         * @param bool $localDBSet $wgLocalDatabases contains the shared DB
         */
        public function testIsAttachedShared( $sharedDB, $sharedTable, $localDBSet ) {
-               global $wgDBName;
                $this->setMwGlobals( [
-                       'wgSharedDB' => $sharedDB ? $wgDBName : null,
+                       'wgSharedDB' => $sharedDB ? "dummy" : null,
                        'wgSharedTables' => $sharedTable ? [ 'user' ] : [],
                        'wgLocalDatabases' => $localDBSet ? [ 'shared' ] : [],
                ] );