mediawiki-extensions-Catego.../tests/phpunit/CategoryTreeServiceWiringTest.php
Fomafix fcaea55e3d Use $this->getServiceContainer() tests
Consistently use
	$this->getServiceContainer()
instead of
	MediaWikiServices::getInstance()
in tests.

Change-Id: I409e4c25b301c9110348bedb7f4457030bbc17e5
2023-10-14 20:25:53 +00:00

27 lines
598 B
PHP

<?php
/**
* Copy of CentralAuth's CentralAuthServiceWiringTest.php
* as it could not be included as it's in another extension.
*/
/**
* @coversNothing
*/
class CategoryTreeServiceWiringTest extends MediaWikiIntegrationTestCase {
/**
* @dataProvider provideService
*/
public function testService( string $name ) {
$this->getServiceContainer()->get( $name );
$this->addToAssertionCount( 1 );
}
public static function provideService() {
$wiring = require __DIR__ . '/../../includes/ServiceWiring.php';
foreach ( $wiring as $name => $_ ) {
yield $name => [ $name ];
}
}
}