| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Copy of CentralAuth's CentralAuthServiceWiringTest.php |
| 5 | * used to test the ServiceWiring.php file. |
| 6 | */ |
| 7 | |
| 8 | namespace MediaWiki\Extension\DiscussionTools\Tests; |
| 9 | |
| 10 | /** |
| 11 | * Tests ServiceWiring.php |
| 12 | * |
| 13 | * @coversNothing PHPUnit does not support covering annotations for files |
| 14 | * @group DiscussionTools |
| 15 | */ |
| 16 | class ServiceWiringTest extends IntegrationTestCase { |
| 17 | /** |
| 18 | * @dataProvider provideService |
| 19 | */ |
| 20 | public function testService( string $name ) { |
| 21 | $this->getServiceContainer()->get( $name ); |
| 22 | $this->addToAssertionCount( 1 ); |
| 23 | } |
| 24 | |
| 25 | public static function provideService() { |
| 26 | $wiring = require __DIR__ . '/../../includes/ServiceWiring.php'; |
| 27 | foreach ( $wiring as $name => $_ ) { |
| 28 | yield $name => [ $name ]; |
| 29 | } |
| 30 | } |
| 31 | } |