Merge "Replace deprecated User::getEffectiveGroups"

This commit is contained in:
jenkins-bot 2021-05-06 14:39:02 +00:00 committed by Gerrit Code Review
commit 45ae0752e5

View file

@ -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.';
}