Use $this->getServiceContainer() tests
Consistently use $this->getServiceContainer() instead of MediaWikiServices::getInstance() in tests. Change-Id: I409e4c25b301c9110348bedb7f4457030bbc17e5
这个提交包含在:
父节点
cb18961b8e
当前提交
fcaea55e3d
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
正在加载...
在新工单中引用