aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/context/RequestContextTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/context/RequestContextTest.php')
-rw-r--r--tests/phpunit/includes/context/RequestContextTest.php7
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."
);