Introduce MovePageFactory
authorAryeh Gregor <ayg@aryeh.name>
Wed, 1 May 2019 11:39:45 +0000 (14:39 +0300)
committerAryeh Gregor <ayg@aryeh.name>
Mon, 19 Aug 2019 17:25:31 +0000 (20:25 +0300)
commit8ec24b607a23f8a51a3b770a562ec8381de6e685
tree5c2bbf5464600ff051af036be4d1ae4696d4bb6a
parentdb0c27a96534d81ef0432dcedeb7bc40ef7e6121
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
18 files changed:
RELEASE-NOTES-1.34
autoload.php
includes/MediaWikiServices.php
includes/MovePage.php
includes/ServiceWiring.php
includes/Title.php
includes/api/ApiMove.php
includes/page/MovePageFactory.php [new file with mode: 0644]
includes/parser/Parser.php
maintenance/cleanupCaps.php
maintenance/moveBatch.php
tests/common/TestsAutoLoader.php
tests/phpunit/includes/MovePageTest.php
tests/phpunit/includes/parser/ParserFactoryIntegrationTest.php [new file with mode: 0644]
tests/phpunit/includes/parser/ParserFactoryTest.php [deleted file]
tests/phpunit/unit/includes/FactoryArgTestTrait.php [new file with mode: 0644]
tests/phpunit/unit/includes/page/MovePageFactoryTest.php [new file with mode: 0644]
tests/phpunit/unit/includes/parser/ParserFactoryTest.php [new file with mode: 0644]