mediawiki-extensions-Echo/tests/phpunit/ServiceWiringTest.php

36 lines
803 B
PHP
Raw Normal View History

<?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
* @group Database
*/
class ServiceWiringTest extends MediaWikiIntegrationTestCase {
/**
* @dataProvider provideService
*/
public function testService( string $name ) {
MediaWikiServices::getInstance()->get( $name );
$this->addToAssertionCount( 1 );
}
public static function provideService() {
$wiring = require __DIR__ . '/../../ServiceWiring.php';
foreach ( $wiring as $name => $_ ) {
yield $name => [ $name ];
}
}
}