diff options
author | Legoktm <legoktm@debian.org> | 2021-12-14 20:34:46 +0000 |
---|---|---|
committer | Kunal Mehta <legoktm@debian.org> | 2021-12-14 12:43:15 -0800 |
commit | 93f79a9122e21bac30d7aaa4961ddf76706710db (patch) | |
tree | ea574f3aa6297f9f6efdd22fc6f5b30c889cb52e /tests/phpunit/includes/context/RequestContextTest.php | |
parent | 7622840cd50b60bb446605750c65c9e7d83e3d43 (diff) | |
download | mediawikicore-93f79a9122e21bac30d7aaa4961ddf76706710db.tar.gz mediawikicore-93f79a9122e21bac30d7aaa4961ddf76706710db.zip |
Revert "Replace deprecated methods IContextSource::getWikiPage && IContextSource::canUseWikiPage"
This reverts commit ef458e894888d5d984f6b8dcf75cfae008d544d0.
Reason for revert: Causes page tabs to disappear on Special:WhatLinksHere.
Bug: T297744
Change-Id: I0ee282a9f7a5a9b2cfdc3261d800d9e27eaf977e
Diffstat (limited to 'tests/phpunit/includes/context/RequestContextTest.php')
-rw-r--r-- | tests/phpunit/includes/context/RequestContextTest.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/phpunit/includes/context/RequestContextTest.php b/tests/phpunit/includes/context/RequestContextTest.php index de249825a206..cb2b9cee582d 100644 --- a/tests/phpunit/includes/context/RequestContextTest.php +++ b/tests/phpunit/includes/context/RequestContextTest.php @@ -1,6 +1,5 @@ <?php -use MediaWiki\MediaWikiServices; use MediaWiki\Permissions\UltimateAuthority; use MediaWiki\User\UserIdentityValue; @@ -20,8 +19,7 @@ class RequestContextTest extends MediaWikiIntegrationTestCase { $curTitle = Title::newFromText( "A" ); $context->setTitle( $curTitle ); - $wikiPage = MediaWikiServices::getInstance()->getWikiPageFactory()->newFromTitle( $context->getTitle() ); - $this->assertTrue( $curTitle->equals( $wikiPage->getTitle() ), + $this->assertTrue( $curTitle->equals( $context->getWikiPage()->getTitle() ), "When a title is first set WikiPage should be created on-demand for that title." ); $curTitle = Title::newFromText( "B" ); @@ -31,9 +29,8 @@ class RequestContextTest extends MediaWikiIntegrationTestCase { $curTitle = Title::newFromText( "C" ); $context->setTitle( $curTitle ); - $wikiPage = MediaWikiServices::getInstance()->getWikiPageFactory()->newFromTitle( $context->getTitle() ); $this->assertTrue( - $curTitle->equals( $wikiPage->getTitle() ), + $curTitle->equals( $context->getWikiPage()->getTitle() ), "When a title is updated the WikiPage should be purged " . "and recreated on-demand with the new title." ); |