From 58ad3d1542d4946bd93d482cb9dd233c335c0362 Mon Sep 17 00:00:00 2001 From: Daimona Eaytoy Date: Thu, 6 May 2021 15:35:35 +0200 Subject: [PATCH] Replace deprecated User::getEffectiveGroups Bug: T281824 Change-Id: I5487d143277a44742048668c920bbad57ebe6af1 --- tests/phpunit/AbuseFilterConsequencesTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/AbuseFilterConsequencesTest.php b/tests/phpunit/AbuseFilterConsequencesTest.php index 79cb7b5b6..6e488b6ba 100644 --- a/tests/phpunit/AbuseFilterConsequencesTest.php +++ b/tests/phpunit/AbuseFilterConsequencesTest.php @@ -687,7 +687,8 @@ class AbuseFilterConsequencesTest extends MediaWikiTestCase { case 'degroup': // Aborts the hook with 'abusefilter-degrouped' error and degroups the user. $expectedErrors['degroup'][] = 'abusefilter-degrouped'; - $groupCheck = !in_array( 'sysop', $this->user->getEffectiveGroups() ); + $ugm = MediaWikiServices::getInstance()->getUserGroupManager(); + $groupCheck = !in_array( 'sysop', $ugm->getUserEffectiveGroups( $this->user ) ); if ( !$groupCheck ) { $testErrorMessage = 'The user was not degrouped.'; }