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:
mainframe98 2019-09-13 18:22:14 +02:00
parent 5595257b44
commit b942fa3c65

View file

@ -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 );