Skip to content

Add @covers annotations to the service-wiring tests#102

Merged
malberts merged 1 commit into
masterfrom
tests/servicewiring-covers
Jun 12, 2026
Merged

Add @covers annotations to the service-wiring tests#102
malberts merged 1 commit into
masterfrom
tests/servicewiring-covers

Conversation

@malberts

Copy link
Copy Markdown
Collaborator

Why

MediaWiki's generated PHPUnit configuration sets forceCoversAnnotation, so any test without a @covers annotation is reported as risky. On the 1.46/master CI rows, three tests in tests/phpunit/Unit/ServiceWiringTest.php were flagged risky for this reason:

  • testCanConstructBootstrapComponentsService
  • testCanConstructComponentLibrary
  • testCanConstructNestingController

What

Each test method now carries a @covers annotation naming the class it constructs through the extension's service wiring (BootstrapComponentsService, ComponentLibrary, NestingController respectively), matching the FQCN style already used elsewhere in the unit suite.

This clears only the @covers risky warnings for these three tests. The remaining getOutput errors on those CI rows are unrelated and will be addressed separately.

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>
@malberts malberts marked this pull request as ready for review June 12, 2026 11:10
@malberts malberts merged commit be13e50 into master Jun 12, 2026
3 of 6 checks passed
@malberts malberts deleted the tests/servicewiring-covers branch June 12, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant