WikiImporter: Pass Authority for permissions instead of global context

Depends-On: Iea1d03dcdcbda2f9a9adbff1b0d319efd22c4d86
Change-Id: I4ec83fe0a887398a216e2b0392dfa852218fef1e
This commit is contained in:
Bartosz Dziewoński 2023-12-08 22:14:58 +01:00
parent b49339f13d
commit 855af15fba

View file

@ -46,7 +46,7 @@ class ThreadItemStoreTest extends IntegrationTestCase {
$source = new ImportStringSource( static::getText( "$dir/dump.xml" ) );
$importer = MediaWikiServices::getInstance()
->getWikiImporterFactory()
->getWikiImporter( $source );
->getWikiImporter( $source, $this->getTestSysop()->getAuthority() );
// `true` means to assign edits to the users we created above
$importer->setUsernamePrefix( 'import', true );
$importer->doImport();