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/changes | |
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/changes')
-rw-r--r-- | tests/phpunit/includes/changes/EnhancedChangesListTest.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/phpunit/includes/changes/EnhancedChangesListTest.php b/tests/phpunit/includes/changes/EnhancedChangesListTest.php index 710ac7017856..258e8f14b028 100644 --- a/tests/phpunit/includes/changes/EnhancedChangesListTest.php +++ b/tests/phpunit/includes/changes/EnhancedChangesListTest.php @@ -229,10 +229,18 @@ class EnhancedChangesListTest extends MediaWikiLangTestCase { */ private function getCategorizationChange( $timestamp, $thisId, $lastId ) { $wikiPage = new WikiPage( Title::newFromText( 'Testpage' ) ); - $wikiPage->doEditContent( new WikitextContent( 'Some random text' ), 'page created' ); + $wikiPage->doUserEditContent( + new WikitextContent( 'Some random text' ), + $this->getTestSysop()->getUser(), + 'page created' + ); $wikiPage = new WikiPage( Title::newFromText( 'Category:Foo' ) ); - $wikiPage->doEditContent( new WikitextContent( 'Some random text' ), 'category page created' ); + $wikiPage->doUserEditContent( + new WikitextContent( 'Some random text' ), + $this->getTestSysop()->getUser(), + 'category page created' + ); $user = $this->getMutableTestUser()->getUser(); $recentChange = $this->testRecentChangesHelper->makeCategorizationRecentChange( |