mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
Merge "Do not directly construct UserrightsPage in tests"
This commit is contained in:
commit
29cd094a6c
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
|
||||
/**
|
||||
* Tests for the built in notification types
|
||||
*
|
||||
|
@ -40,9 +38,9 @@ class NotificationsTest extends MediaWikiTestCase {
|
|||
|
||||
$context = new DerivativeContext( RequestContext::getMain() );
|
||||
$context->setUser( $this->sysop );
|
||||
$ur = new UserrightsPage(
|
||||
MediaWikiServices::getInstance()->getPermissionManager()
|
||||
);
|
||||
$ur = $this->getServiceContainer()
|
||||
->getSpecialPageFactory()
|
||||
->getPage( 'Userrights' );
|
||||
$ur->setContext( $context );
|
||||
$ur->doSaveUserGroups( $user, [ 'sysop' ], [], 'reason' );
|
||||
$event = self::getLatestNotification( $user );
|
||||
|
|
Loading…
Reference in a new issue