We want to start pushing coverage reports so that CI can complain when unit test coverage drops. To do this we need to annotate our code so MediaWiki core knows about it.
We're running coverage tests with `forceCoversAnnotation=true`option. It means that all PHPUnit tests require `@covers` statement, otherwise coverage report will not include those unit tests. Because in near future we will enable code coverage reports for MobileFrontend extension (Task: T151333) it would be nice to fix it.
Additionally we should add PHPCS check that every unit tests must have `@covers`/`@coversNothing`/`@coversDefaultClass` annotation so we do not end up with same issue as we already solved similar problem some time ago (Task: T102006 ).
Missing annotations are inside:
|Unit test|missing `@covers` count|
|ApiMobileViewTest|4|
|ApiParseExtenderTest|1|
|All tests in Devices folder|19|
|SkinMinervaTest|3|
|MobileContextTest|2|
|MobileFormatterTest|3|
|MobileFrontend.hooksTest|1|
|MobileFrontend.skin.hooksTest|1|
In total there are 34 test cases where we need to check which functions are tested and add proper `@covers` statements.
After fixing those it would be nice to include [[ https://github.com/WordPoints/dev-lib/blob/develop/phpcs/WordPoints/Sniffs/PHPUnit/MissingCoversSniff.php | MissingCoversSniff ]] to phpcs config.