Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.7.1, 3.8
-
Fix Version/s: 3.7.3
-
Component/s: Unit tests
-
Labels:
-
Testing Instructions:
-
Affected Branches:MOODLE_37_STABLE, MOODLE_38_STABLE
-
Fixed Branches:MOODLE_37_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-66011-master -
Pull Master Diff URL:
Description
We initially introduced this partially because of a bug in phpunit, partially a bug in php, and partially incorrect documentation in the phpunit docs. All of these things have been fixed.
In addition to that, PHPUnit will be removing the @covers::<!public> annotation and friends in PHPUnit 10 (only @covers::functionName will continue to work) and I/we don't think that it makes a huge amount of sense to cover private/protected functions as they are implementation specific parts of an API when it's not really the tests business as to how the implementation achieves the result.
So: Let us remove the forceCoversAnnotation.
We can continue to add @covers::functionName annotations if we desire because they still have a value in that you can add --strict-covers to the CLI which can be helpful when writing tests.