diff options
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; } |