mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-27 09:43:06 +00:00
fcaea55e3d
Consistently use $this->getServiceContainer() instead of MediaWikiServices::getInstance() in tests. Change-Id: I409e4c25b301c9110348bedb7f4457030bbc17e5
27 lines
598 B
PHP
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 ];
|
|
}
|
|
}
|
|
}
|