mediawiki-extensions-Catego.../tests/phpunit/CategoryTreeServiceWiringTest.php
Umherirrender 9d9b921b0b tests: Make PHPUnit data providers static
Initally used a new sniff with autofix (T333745)

Bug: T332865
Change-Id: If047c9c0bb337cea21e3825456eb3954dd1b693a
2023-05-20 11:19:06 +02:00

29 lines
636 B
PHP

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