diff options
author | DannyS712 <dannys712.wiki@gmail.com> | 2021-06-24 08:42:19 +0000 |
---|---|---|
committer | DannyS712 <dannys712.wiki@gmail.com> | 2021-06-28 00:11:30 -0700 |
commit | b45ddb2ab370f22162934987942eeae2d600675c (patch) | |
tree | dc36495d68534020b357cfa70cfc49cfc113bbd6 /tests/phpunit/includes/api/query/ApiQueryRecentChangesIntegrationTest.php | |
parent | 87500874e2b55e3da0735d71b0a0123882e149b5 (diff) | |
download | mediawikicore-b45ddb2ab370f22162934987942eeae2d600675c.tar.gz mediawikicore-b45ddb2ab370f22162934987942eeae2d600675c.zip |
Use WikiPage::doUserEditContent() instead of ::doEditContent()
Results in passing a user where previously the fallback
to $wgUser was being used, mostly in tests.
Bug: T255507
Change-Id: Iabe24315b23c0ad1272353186425e71974528d23
Diffstat (limited to 'tests/phpunit/includes/api/query/ApiQueryRecentChangesIntegrationTest.php')
-rw-r--r-- | tests/phpunit/includes/api/query/ApiQueryRecentChangesIntegrationTest.php | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/tests/phpunit/includes/api/query/ApiQueryRecentChangesIntegrationTest.php b/tests/phpunit/includes/api/query/ApiQueryRecentChangesIntegrationTest.php index 85d258ac5c16..e2d7ee1fd3fa 100644 --- a/tests/phpunit/includes/api/query/ApiQueryRecentChangesIntegrationTest.php +++ b/tests/phpunit/includes/api/query/ApiQueryRecentChangesIntegrationTest.php @@ -26,48 +26,42 @@ class ApiQueryRecentChangesIntegrationTest extends ApiTestCase { $title = Title::newFromLinkTarget( $target ); $page = WikiPage::factory( $title ); - $page->doEditContent( + $page->doUserEditContent( ContentHandler::makeContent( __CLASS__ . $i++, $title ), - $summary, - 0, - false, - $user + $user, + $summary ); } private function doMinorPageEdit( User $user, LinkTarget $target, $summary ) { $title = Title::newFromLinkTarget( $target ); $page = WikiPage::factory( $title ); - $page->doEditContent( + $page->doUserEditContent( ContentHandler::makeContent( __CLASS__, $title ), + $user, $summary, - EDIT_MINOR, - false, - $user + EDIT_MINOR ); } private function doBotPageEdit( User $user, LinkTarget $target, $summary ) { $title = Title::newFromLinkTarget( $target ); $page = WikiPage::factory( $title ); - $page->doEditContent( + $page->doUserEditContent( ContentHandler::makeContent( __CLASS__, $title ), + $user, $summary, - EDIT_FORCE_BOT, - false, - $user + EDIT_FORCE_BOT ); } private function doAnonPageEdit( LinkTarget $target, $summary ) { $title = Title::newFromLinkTarget( $target ); $page = WikiPage::factory( $title ); - $page->doEditContent( + $page->doUserEditContent( ContentHandler::makeContent( __CLASS__, $title ), - $summary, - 0, - false, - User::newFromId( 0 ) + User::newFromId( 0 ), + $summary ); } |