Skip to content

Commit be13e50

Browse files
malbertsclaude
andcommitted
tests: add @Covers annotations to the service-wiring tests
The three service-wiring construction tests lacked @Covers annotations, so MediaWiki's generated PHPUnit config (which sets forceCoversAnnotation) flagged them as risky. Annotate each test method with the class it exercises through the extension's service wiring: BootstrapComponentsService, ComponentLibrary, and NestingController. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 391390b commit be13e50

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎tests/phpunit/Unit/ServiceWiringTest.php‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,29 @@
2222
class ServiceWiringTest extends TestCase {
2323

2424

25+
/**
26+
* @covers \MediaWiki\Extension\BootstrapComponents\BootstrapComponentsService
27+
*/
2528
public function testCanConstructBootstrapComponentsService() {
2629
$this->assertInstanceOf(
2730
BootstrapComponentsService::class,
2831
MediaWikiServices::getInstance()->getService('BootstrapComponentsService')
2932
);
3033
}
3134

35+
/**
36+
* @covers \MediaWiki\Extension\BootstrapComponents\ComponentLibrary
37+
*/
3238
public function testCanConstructComponentLibrary() {
3339
$this->assertInstanceOf(
3440
ComponentLibrary::class,
3541
MediaWikiServices::getInstance()->getService('BootstrapComponents.ComponentLibrary')
3642
);
3743
}
3844

45+
/**
46+
* @covers \MediaWiki\Extension\BootstrapComponents\NestingController
47+
*/
3948
public function testCanConstructNestingController() {
4049
$this->assertInstanceOf(
4150
NestingController::class,

0 commit comments

Comments
 (0)