From fcaea55e3d9e7c9e357f6fc29bf42990393b0c02 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Sat, 14 Oct 2023 20:25:53 +0000 Subject: [PATCH] Use $this->getServiceContainer() tests Consistently use $this->getServiceContainer() instead of MediaWikiServices::getInstance() in tests. Change-Id: I409e4c25b301c9110348bedb7f4457030bbc17e5 --- tests/phpunit/CategoryTreeServiceWiringTest.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/phpunit/CategoryTreeServiceWiringTest.php b/tests/phpunit/CategoryTreeServiceWiringTest.php index e747a4a6..e2101112 100644 --- a/tests/phpunit/CategoryTreeServiceWiringTest.php +++ b/tests/phpunit/CategoryTreeServiceWiringTest.php @@ -5,8 +5,6 @@ * as it could not be included as it's in another extension. */ -use MediaWiki\MediaWikiServices; - /** * @coversNothing */ @@ -15,7 +13,7 @@ class CategoryTreeServiceWiringTest extends MediaWikiIntegrationTestCase { * @dataProvider provideService */ public function testService( string $name ) { - MediaWikiServices::getInstance()->get( $name ); + $this->getServiceContainer()->get( $name ); $this->addToAssertionCount( 1 ); }