mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
713f60aaa5
Use mocks when possible, and add the test to the Database group otherwise. Also rename 2 test files to avoid a PHPUnit deprecation of file name not matching class name. Change-Id: I16b2392daf01f63511c82b4ed0e67a38e35ddbe1
36 lines
803 B
PHP
36 lines
803 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
|
|
* @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 ];
|
|
}
|
|
}
|
|
}
|