Page MenuHomePhabricator

JsonConfig extension is missing @covers tags
Closed, ResolvedPublic


PHPCS has identified that some of the JsonConfig PHPUnit tests are missing @covers tags. Those tags
are necessary for PHPUnit to accurately calculate test coverage.

See the PHPUnit documentation for how to use it.

Once the tags have been added, the MissingCovers sniff should be re-enabled in .phpcs.xml.

Event Timeline

Vvjjkkii renamed this task from JsonConfig extension is missing @covers tags to qmcaaaaaaa.Jul 1 2018, 1:08 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from qmcaaaaaaa to JsonConfig extension is missing @covers tags.Jul 1 2018, 5:18 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.

Change 448844 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/JsonConfig@master] Add missing @covers tags and minor cleanup

Not full done yet, because the patch set contains @covers in JCTabularContentTest.php [1], but it seems that the @covers triggers autoload of \JsonConfig\JCLuaLibrary but Scribunto_LuaLibraryBase is not present and phpunit fails.

It could be possible that the MediaWikiCoversValidator autoload the class to check if the method exists. It could be fixed by adding Scribunto to extension-gate, but that may fail locally for other devoloper. No further idea...


Change 448844 merged by jenkins-bot:
[mediawiki/extensions/JsonConfig@master] Add missing @covers tags and minor cleanup

Legoktm claimed this task.