newSpecialPage(); $view = $sp->instantiateView( $viewClass, $params ); $this->assertInstanceOf( $viewClass, $view ); } public function provideInstantiateView() : array { return [ [ AbuseFilterViewDiff::class ], [ AbuseFilterViewEdit::class, [ 'filter' => 1 ] ], [ AbuseFilterViewExamine::class ], [ AbuseFilterViewHistory::class ], [ AbuseFilterViewImport::class ], [ AbuseFilterViewList::class ], [ AbuseFilterViewRevert::class ], [ AbuseFilterViewTestBatch::class ], [ AbuseFilterViewTools::class ], ]; } /** * @inheritDoc */ protected function newSpecialPage() : SpecialAbuseFilter { $services = MediaWikiServices::getInstance(); $sp = new SpecialAbuseFilter( $services->getObjectFactory() ); $sp->setLinkRenderer( $services->getLinkRendererFactory()->create() ); return $sp; } }