This will help make MovePage more testable. In the course of abstracting the logic out of ParserFactoryTest to FactoryArgTestTrait so it could be used in MovePageFactoryTest, I made them all unit tests instead of integration. This required some modification to the Parser constructor so that it didn't access MediaWikiServices unnecessarily. Change-Id: Idaa1633f32dfedfa37516bb9180cfcfbe7ca31aa
23 lines
416 B
PHP
23 lines
416 B
PHP
<?php
|
|
|
|
use MediaWiki\Page\MovePageFactory;
|
|
|
|
/**
|
|
* @covers MediaWiki\Page\MovePageFactory
|
|
*/
|
|
class MovePageFactoryTest extends MediaWikiUnitTestCase {
|
|
use FactoryArgTestTrait;
|
|
|
|
protected function getFactoryClass() {
|
|
return MovePageFactory::class;
|
|
}
|
|
|
|
protected function getInstanceClass() {
|
|
return MovePage::class;
|
|
}
|
|
|
|
protected static function getExtraClassArgCount() {
|
|
// $to and $from
|
|
return 2;
|
|
}
|
|
}
|