tests: pass $performer to WikiImporterFactory::getWikiImporter on 1.42

This commit is contained in:
CosmicAlpha 2024-02-16 12:28:36 -07:00 committed by GitHub
parent 45c195f6bd
commit a32213532c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -88,6 +88,11 @@ abstract class DPLIntegrationTestCase extends MediaWikiIntegrationTestCase {
$source = new ImportStreamSource( $seedDataFile );
$services = MediaWikiServices::getInstance();
if ( version_compare( MW_VERSION, '1.42', '>=' ) ) {
$performer = $this->getTestSysop()->getAuthority();
return $services->getWikiImporterFactory()->getWikiImporter( $source, $performer );
}
return $services->getWikiImporterFactory()->getWikiImporter( $source );
}