From 57a1d0196be45a580053e90f7d89ba9a7cb4eed4 Mon Sep 17 00:00:00 2001 From: Alexander Vorwerk Date: Thu, 16 Dec 2021 21:54:21 +0100 Subject: [PATCH] Avoid using WikiPage::factory() WikiPage::factory() is deprecated since 1.36 and should be replaced with WikiPageFactory::newFromTitle(). Bug: T297688 Change-Id: I6c754b872c3b60ad724af8c18faacbf7320579fa --- tests/phpunit/TemplateStylesHooksTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/TemplateStylesHooksTest.php b/tests/phpunit/TemplateStylesHooksTest.php index a6570e0..e114d88 100644 --- a/tests/phpunit/TemplateStylesHooksTest.php +++ b/tests/phpunit/TemplateStylesHooksTest.php @@ -16,7 +16,7 @@ class TemplateStylesHooksTest extends MediaWikiLangTestCase { $title = Title::newFromText( 'Template:TemplateStyles test/' . $page ); $content = ContentHandler::makeContent( $text, $title, $model ); - $page = WikiPage::factory( $title ); + $page = $this->getServiceContainer()->getWikiPageFactory()->newFromTitle( $title ); $user = static::getTestSysop()->getUser(); $status = $page->doUserEditContent( $content, $user, 'Test for TemplateStyles' ); if ( !$status->isOk() ) {