aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/changes
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2022-06-26 23:21:02 +0200
committerUmherirrender <umherirrender_de.wp@web.de>2022-06-26 23:21:02 +0200
commit8b1a3d13eb12a1c0e9e98a245374b3f71822f61a (patch)
treeeb068a2477d9f5c89a4b35776c54be677b6d2838 /tests/phpunit/includes/changes
parent56fab95e0b470a77cb6fcdd86b343732528acc24 (diff)
downloadmediawikicore-8b1a3d13eb12a1c0e9e98a245374b3f71822f61a.tar.gz
mediawikicore-8b1a3d13eb12a1c0e9e98a245374b3f71822f61a.zip
tests: Use WikiPageFactory to create WikiPage object
Bug: T259948 Change-Id: I9afcf3b845306f81ee5ca156553256e6c38df3a0
Diffstat (limited to 'tests/phpunit/includes/changes')
-rw-r--r--tests/phpunit/includes/changes/EnhancedChangesListTest.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/phpunit/includes/changes/EnhancedChangesListTest.php b/tests/phpunit/includes/changes/EnhancedChangesListTest.php
index 03128a7bf9d0..f43937c4f1ee 100644
--- a/tests/phpunit/includes/changes/EnhancedChangesListTest.php
+++ b/tests/phpunit/includes/changes/EnhancedChangesListTest.php
@@ -228,14 +228,14 @@ class EnhancedChangesListTest extends MediaWikiLangTestCase {
* @return RecentChange
*/
private function getCategorizationChange( $timestamp, $thisId, $lastId ) {
- $wikiPage = new WikiPage( Title::newFromText( 'Testpage' ) );
+ $wikiPage = $this->getServiceContainer()->getWikiPageFactory()->newFromTitle( Title::newFromText( 'Testpage' ) );
$wikiPage->doUserEditContent(
new WikitextContent( 'Some random text' ),
$this->getTestSysop()->getUser(),
'page created'
);
- $wikiPage = new WikiPage( Title::newFromText( 'Category:Foo' ) );
+ $wikiPage = $this->getServiceContainer()->getWikiPageFactory()->newFromTitle( Title::newFromText( 'Category:Foo' ) );
$wikiPage->doUserEditContent(
new WikitextContent( 'Some random text' ),
$this->getTestSysop()->getUser(),