mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-24 13:44:40 +00:00
829003cabf
Use $this->getServiceContainer() instead of MediaWikiServices::getInstance() in maintenance and tests. Change-Id: I845e8f083b19da093166d6551683f2013eec7bb1
35 lines
766 B
PHP
35 lines
766 B
PHP
<?php
|
|
|
|
/**
|
|
* Copy of CentralAuth's CentralAuthServiceWiringTest.php
|
|
* used to test the ServiceWiring.php file.
|
|
*/
|
|
|
|
namespace MediaWiki\Extension\Notifications\Test;
|
|
|
|
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 ) {
|
|
$this->getServiceContainer()->get( $name );
|
|
$this->addToAssertionCount( 1 );
|
|
}
|
|
|
|
public static function provideService() {
|
|
$wiring = require __DIR__ . '/../../ServiceWiring.php';
|
|
foreach ( $wiring as $name => $_ ) {
|
|
yield $name => [ $name ];
|
|
}
|
|
}
|
|
}
|