mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateStyles
synced 2024-11-15 03:35:47 +00:00
Avoid using WikiPage::factory()
WikiPage::factory() is deprecated since 1.36 and should be replaced with WikiPageFactory::newFromTitle(). Bug: T297688 Change-Id: I6c754b872c3b60ad724af8c18faacbf7320579fa
This commit is contained in:
parent
a2f5b987a7
commit
57a1d0196b
|
@ -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() ) {
|
||||
|
|
Loading…
Reference in a new issue