mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-11 07:26:29 +00:00
35 lines
777 B
PHP
35 lines
777 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* Copy of CentralAuth's CentralAuthServiceWiringTest.php
|
||
|
* used to test the ServiceWiring.php file.
|
||
|
*/
|
||
|
|
||
|
namespace MediaWiki\Extension\Notifications\Test;
|
||
|
|
||
|
use MediaWiki\MediaWikiServices;
|
||
|
use MediaWikiIntegrationTestCase;
|
||
|
|
||
|
/**
|
||
|
* Tests ServiceWiring.php
|
||
|
*
|
||
|
* @coversNothing PHPUnit does not support covering annotations for files
|
||
|
* @group Echo
|
||
|
*/
|
||
|
class ServiceWiringTest extends MediaWikiIntegrationTestCase {
|
||
|
/**
|
||
|
* @dataProvider provideService
|
||
|
*/
|
||
|
public function testService( string $name ) {
|
||
|
MediaWikiServices::getInstance()->get( $name );
|
||
|
$this->addToAssertionCount( 1 );
|
||
|
}
|
||
|
|
||
|
public function provideService() {
|
||
|
$wiring = require __DIR__ . '/../../ServiceWiring.php';
|
||
|
foreach ( $wiring as $name => $_ ) {
|
||
|
yield $name => [ $name ];
|
||
|
}
|
||
|
}
|
||
|
}
|