mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
8b551618bb
Initally used a new sniff with autofix (T333745) Bug: T332865 Change-Id: I3b341ec4d14591e6265f86c5179b7dbff07d1076
34 lines
764 B
PHP
34 lines
764 B
PHP
<?php
|
|
|
|
/**
|
|
* Copy of CentralAuth's CentralAuthServiceWiringTest.php
|
|
* used to test the ServiceWiring.php file.
|
|
*/
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Tests;
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
/**
|
|
* Tests ServiceWiring.php
|
|
*
|
|
* @coversNothing PHPUnit does not support covering annotations for files
|
|
* @group DiscussionTools
|
|
*/
|
|
class ServiceWiringTest extends IntegrationTestCase {
|
|
/**
|
|
* @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 ];
|
|
}
|
|
}
|
|
}
|