aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiMove.php
diff options
context:
space:
mode:
authorAryeh Gregor <ayg@aryeh.name>2019-05-01 14:39:45 +0300
committerAryeh Gregor <ayg@aryeh.name>2019-08-19 20:25:31 +0300
commit8ec24b607a23f8a51a3b770a562ec8381de6e685 (patch)
tree5c2bbf5464600ff051af036be4d1ae4696d4bb6a /includes/api/ApiMove.php
parentdb0c27a96534d81ef0432dcedeb7bc40ef7e6121 (diff)
downloadmediawikicore-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.php2
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;