This patch injects services into WikiImporter. It also adds a WikiImporterFactory service for creating WikiImporter instances. Change-Id: I2966297e5728fca1ae8280361f1008cef6c6041b
31 lines
583 B
PHP
31 lines
583 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Tests\Import;
|
|
|
|
use FactoryArgTestTrait;
|
|
use MediaWikiUnitTestCase;
|
|
use WikiImporter;
|
|
use WikiImporterFactory;
|
|
|
|
/**
|
|
* @covers WikiImporterFactory
|
|
*/
|
|
class WikiImporterFactoryTest extends MediaWikiUnitTestCase {
|
|
use FactoryArgTestTrait;
|
|
|
|
protected static function getFactoryClass() {
|
|
return WikiImporterFactory::class;
|
|
}
|
|
|
|
protected static function getInstanceClass() {
|
|
return WikiImporter::class;
|
|
}
|
|
|
|
protected static function getExtraClassArgCount() {
|
|
return 1;
|
|
}
|
|
|
|
protected function getFactoryMethodName() {
|
|
return 'getWikiImporter';
|
|
}
|
|
}
|