mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-03 11:46:43 +00:00
0583639a6a
Initally used a new sniff with autofix (T333745) Bug: T332865 Change-Id: Ia03ad50ac5d34e9c012a8fad068adabd2e5d8669
36 lines
880 B
PHP
36 lines
880 B
PHP
<?php
|
|
|
|
/**
|
|
* Copy of CentralAuth's CentralAuthServiceWiringTest.php
|
|
* used to test the ServiceWiring.php file.
|
|
*/
|
|
|
|
namespace MediaWiki\Skins\Vector\Tests\Integration;
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
use MediaWikiIntegrationTestCase;
|
|
|
|
/**
|
|
* Partly Tests ServiceWiring.php by ensuring that the call to the
|
|
* service does not result in an error.
|
|
*
|
|
* @coversNothing PHPUnit does not support covering annotations for files
|
|
* @group Vector
|
|
*/
|
|
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__ . '/../../../includes/ServiceWiring.php';
|
|
foreach ( $wiring as $name => $_ ) {
|
|
yield $name => [ $name ];
|
|
}
|
|
}
|
|
}
|