This patch injects services into WikiExporter. It also adds a WikiExporterFactory service for creating WikiExporter instances. Change-Id: Ib1547defea54c309865c116bc83d617c21568843
39 lines
807 B
PHP
39 lines
807 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Tests\Export;
|
|
|
|
use FactoryArgTestTrait;
|
|
use MediaWiki\Export\WikiExporterFactory;
|
|
use MediaWikiIntegrationTestCase;
|
|
use WikiExporter;
|
|
use XmlDumpWriter;
|
|
|
|
/**
|
|
* @covers MediaWiki\Export\WikiExporterFactory
|
|
*/
|
|
class WikiExporterFactoryTest extends MediaWikiIntegrationTestCase {
|
|
use FactoryArgTestTrait;
|
|
|
|
protected function setUp(): void {
|
|
parent::setUp();
|
|
$this->setMwGlobals( [
|
|
'XmlDumpSchemaVersion' => XmlDumpWriter::$supportedSchemas[0],
|
|
] );
|
|
}
|
|
|
|
protected static function getFactoryClass() {
|
|
return WikiExporterFactory::class;
|
|
}
|
|
|
|
protected static function getInstanceClass() {
|
|
return WikiExporter::class;
|
|
}
|
|
|
|
protected static function getExtraClassArgCount() {
|
|
return 4;
|
|
}
|
|
|
|
protected function getFactoryMethodName() {
|
|
return 'getWikiExporter';
|
|
}
|
|
}
|