mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
Inject PermissionManager into Userrightspage in tests
With I40fc8a709de96aceee14a10c973cd5b0a9a6f063 UserrightsPage now requires the PermissionManager service to be injected. Change-Id: Ibf3728c1e143787fb35b88ad8a8d5aabc8fadcb8
This commit is contained in:
parent
5595257b44
commit
b942fa3c65
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use MediaWiki\MediaWikiServices;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for the built in notification types
|
* Tests for the built in notification types
|
||||||
*
|
*
|
||||||
|
@ -41,7 +43,9 @@ class NotificationsTest extends MediaWikiTestCase {
|
||||||
|
|
||||||
$context = new DerivativeContext( RequestContext::getMain() );
|
$context = new DerivativeContext( RequestContext::getMain() );
|
||||||
$context->setUser( $this->sysop );
|
$context->setUser( $this->sysop );
|
||||||
$ur = new UserrightsPage();
|
$ur = new UserrightsPage(
|
||||||
|
MediaWikiServices::getInstance()->getPermissionManager()
|
||||||
|
);
|
||||||
$ur->setContext( $context );
|
$ur->setContext( $context );
|
||||||
$ur->doSaveUserGroups( $user, [ 'sysop' ], [], 'reason' );
|
$ur->doSaveUserGroups( $user, [ 'sysop' ], [], 'reason' );
|
||||||
$event = self::getLatestNotification( $user );
|
$event = self::getLatestNotification( $user );
|
||||||
|
|
Loading…
Reference in a new issue