<?php
use MediaWiki\Block\DatabaseBlock;
+use MediaWiki\MediaWikiServices;
/**
* @group API
if ( $remove ) {
$this->mergeMwGlobalArrayValue( 'wgRemoveGroups', [ 'bureaucrat' => $remove ] );
}
+
+ $this->resetServices();
}
/**
$res = $this->doApiRequestWithToken( $params );
$user->clearInstanceCache();
+ MediaWikiServices::getInstance()->getPermissionManager()->invalidateUsersRightsCache();
$this->assertSame( $expectedGroups, $user->getGroups() );
$this->assertArrayNotHasKey( 'warnings', $res[0] );
ChangeTags::defineTag( 'custom tag' );
$this->setGroupPermissions( 'user', 'applychangetags', false );
+ $this->resetServices();
$this->doFailedRightsChange(
'You do not have permission to apply change tags along with your changes.',