diff options
Diffstat (limited to 'CheckUser/tests/phpunit/CheckUserServiceWiringTest.php')
-rw-r--r-- | CheckUser/tests/phpunit/CheckUserServiceWiringTest.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/CheckUser/tests/phpunit/CheckUserServiceWiringTest.php b/CheckUser/tests/phpunit/CheckUserServiceWiringTest.php new file mode 100644 index 00000000..2fdf3969 --- /dev/null +++ b/CheckUser/tests/phpunit/CheckUserServiceWiringTest.php @@ -0,0 +1,28 @@ +<?php + +/** + * Copy of CentralAuth's CentralAuthServiceWiringTest.php + * as it could not be included as it's in another extension. + */ + +use MediaWiki\MediaWikiServices; + +/** + * @coversNothing + */ +class CheckUserServiceWiringTest extends MediaWikiIntegrationTestCase { + /** + * @dataProvider provideService + */ + public function testService( string $name ) { + MediaWikiServices::getInstance()->get( $name ); + $this->addToAssertionCount( 1 ); + } + + public function provideService() { + $wiring = require __DIR__ . '/../../src/ServiceWiring.php'; + foreach ( $wiring as $name => $_ ) { + yield $name => [ $name ]; + } + } +} |