diff options
author | Aryeh Gregor <ayg@aryeh.name> | 2019-05-01 14:39:45 +0300 |
---|---|---|
committer | Aryeh Gregor <ayg@aryeh.name> | 2019-08-19 20:25:31 +0300 |
commit | 8ec24b607a23f8a51a3b770a562ec8381de6e685 (patch) | |
tree | 5c2bbf5464600ff051af036be4d1ae4696d4bb6a /includes/api/ApiMove.php | |
parent | db0c27a96534d81ef0432dcedeb7bc40ef7e6121 (diff) | |
download | mediawikicore-8ec24b607a23f8a51a3b770a562ec8381de6e685.tar.gz mediawikicore-8ec24b607a23f8a51a3b770a562ec8381de6e685.zip |
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
Diffstat (limited to 'includes/api/ApiMove.php')
-rw-r--r-- | includes/api/ApiMove.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php index 540860b3a9d9..0a788d4e267d 100644 --- a/includes/api/ApiMove.php +++ b/includes/api/ApiMove.php @@ -172,7 +172,7 @@ class ApiMove extends ApiBase { * @return Status */ protected function movePage( Title $from, Title $to, $reason, $createRedirect, $changeTags ) { - $mp = new MovePage( $from, $to ); + $mp = MediaWikiServices::getInstance()->getMovePageFactory()->newMovePage( $from, $to ); $valid = $mp->isValidMove(); if ( !$valid->isOK() ) { return $valid; |