aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/content/WikitextContentHandlerTest.php
diff options
context:
space:
mode:
authorAlexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de>2022-01-12 21:13:39 +0100
committerAlexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de>2022-01-27 22:04:16 +0100
commitdecbaf4f384cd53912c0d21762b2b64309cb30f0 (patch)
treed9716312fc58ed176ad02c2860005e523c275d75 /tests/phpunit/includes/content/WikitextContentHandlerTest.php
parente05dde5bc4bcfa5b636272978ff9be5100aebe94 (diff)
downloadmediawikicore-decbaf4f384cd53912c0d21762b2b64309cb30f0.tar.gz
mediawikicore-decbaf4f384cd53912c0d21762b2b64309cb30f0.zip
phpunit: use ->getServiceContainer() in integration tests
Change-Id: I38299cb65eeaadfdc0eb05db4e8c0b0119cfb37d
Diffstat (limited to 'tests/phpunit/includes/content/WikitextContentHandlerTest.php')
-rw-r--r--tests/phpunit/includes/content/WikitextContentHandlerTest.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php b/tests/phpunit/includes/content/WikitextContentHandlerTest.php
index 36c19ca9efa4..515b2c80639b 100644
--- a/tests/phpunit/includes/content/WikitextContentHandlerTest.php
+++ b/tests/phpunit/includes/content/WikitextContentHandlerTest.php
@@ -1,6 +1,5 @@
<?php
-use MediaWiki\MediaWikiServices;
use MediaWiki\Page\PageReferenceValue;
/**
@@ -15,7 +14,7 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase {
protected function setUp(): void {
parent::setUp();
- $this->handler = MediaWikiServices::getInstance()->getContentHandlerFactory()
+ $this->handler = $this->getServiceContainer()->getContentHandlerFactory()
->getContentHandler( CONTENT_MODEL_WIKITEXT );
}
@@ -26,9 +25,9 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase {
* @covers WikitextContentHandler::makeRedirectContent
*/
public function testMakeRedirectContent( $title, $expected ) {
- MediaWikiServices::getInstance()->getContentLanguage()->resetNamespaces();
+ $this->getServiceContainer()->getContentLanguage()->resetNamespaces();
- MediaWikiServices::getInstance()->resetServiceForTesting( 'MagicWordFactory' );
+ $this->getServiceContainer()->resetServiceForTesting( 'MagicWordFactory' );
if ( is_string( $title ) ) {
$title = Title::newFromText( $title );