mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Nuke
synced 2024-11-24 00:05:33 +00:00
Use SpecialPageFactory in SpecialNukeTest
Core's SpecialLog is not @newable, therefore the constructor may change without notice (which has apparently happened in 07db710). Change-Id: I91964bcd787201c89c5eb6f623daba86d8d28d3e
This commit is contained in:
parent
bad287793a
commit
68269df6ea
|
@ -5,7 +5,6 @@ namespace MediaWiki\Extension\Nuke\Test\Integration;
|
||||||
use MediaWiki\Extension\Nuke\SpecialNuke;
|
use MediaWiki\Extension\Nuke\SpecialNuke;
|
||||||
use MediaWiki\Permissions\UltimateAuthority;
|
use MediaWiki\Permissions\UltimateAuthority;
|
||||||
use MediaWiki\Request\FauxRequest;
|
use MediaWiki\Request\FauxRequest;
|
||||||
use MediaWiki\Specials\SpecialLog;
|
|
||||||
use MediaWiki\Title\Title;
|
use MediaWiki\Title\Title;
|
||||||
use PermissionsError;
|
use PermissionsError;
|
||||||
use SpecialPageTestBase;
|
use SpecialPageTestBase;
|
||||||
|
@ -624,13 +623,7 @@ class SpecialNukeTest extends SpecialPageTestBase {
|
||||||
|
|
||||||
private function getDeleteLogHtml(): string {
|
private function getDeleteLogHtml(): string {
|
||||||
$services = $this->getServiceContainer();
|
$services = $this->getServiceContainer();
|
||||||
$specialLog = new SpecialLog(
|
$specialLog = $services->getSpecialPageFactory()->getPage( 'Log' );
|
||||||
$services->getLinkBatchFactory(),
|
|
||||||
$services->getConnectionProvider(),
|
|
||||||
$services->getActorNormalization(),
|
|
||||||
$services->getUserIdentityLookup(),
|
|
||||||
$services->getUserNameUtils()
|
|
||||||
);
|
|
||||||
$specialLog->execute( "delete" );
|
$specialLog->execute( "delete" );
|
||||||
return $specialLog->getOutput()->getHTML();
|
return $specialLog->getOutput()->getHTML();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue