diff options
author | Brian Evans <grknight@gentoo.org> | 2022-09-27 18:53:03 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2022-09-27 19:02:02 -0400 |
commit | 5ca8d30155e11d97b20f79acec40632c2e06fcd5 (patch) | |
tree | 7531fb116791f8328c0bb0cabe42265ca67e6df9 /MLEB/Translate/tests/phpunit/TranslateSandboxTest.php | |
parent | Merge branch 'master' into wikitest (diff) | |
download | extensions-5ca8d30155e11d97b20f79acec40632c2e06fcd5.tar.gz extensions-5ca8d30155e11d97b20f79acec40632c2e06fcd5.tar.bz2 extensions-5ca8d30155e11d97b20f79acec40632c2e06fcd5.zip |
Update MLEB to 2021.12v1.35.2
This is the final version for MW 1.35
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'MLEB/Translate/tests/phpunit/TranslateSandboxTest.php')
-rw-r--r-- | MLEB/Translate/tests/phpunit/TranslateSandboxTest.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/MLEB/Translate/tests/phpunit/TranslateSandboxTest.php b/MLEB/Translate/tests/phpunit/TranslateSandboxTest.php index 58198f8c..84746f2e 100644 --- a/MLEB/Translate/tests/phpunit/TranslateSandboxTest.php +++ b/MLEB/Translate/tests/phpunit/TranslateSandboxTest.php @@ -20,6 +20,7 @@ class TranslateSandboxTest extends MediaWikiIntegrationTestCase { // Make sure the hooks are installed even if $wgTranslateUseSandbox is false. TranslateHooks::setupTranslate(); + $this->tablesUsed[] = 'user'; } /** @@ -27,13 +28,8 @@ class TranslateSandboxTest extends MediaWikiIntegrationTestCase { * @return array|string[] */ private function getUserGroups( User $user ): array { - if ( method_exists( MediaWikiServices::class, 'getUserGroupManager' ) ) { - // MediaWiki 1.35+ - $userGroupManager = MediaWikiServices::getInstance()->getUserGroupManager(); - $groups = $userGroupManager->getUserGroups( $user ); - } else { - $groups = $user->getGroups(); - } + $userGroupManager = MediaWikiServices::getInstance()->getUserGroupManager(); + $groups = $userGroupManager->getUserGroups( $user ); return $groups; } |