wiki.techinc.nl/tests/phpunit/unit/includes/page/MovePageFactoryTest.php
Aryeh Gregor 8ec24b607a Introduce MovePageFactory
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
2019-08-19 20:25:31 +03:00

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;
}
}