Skip to content

Concepts

Scott Dutton edited this page Oct 7, 2017 · 4 revisions

Coverage

This tool tracks coverage of a pull request. This changes based on the input.

For phpunit

phpunit only considers lines with code on, This comes back in the clover file, so a more accurate measure can be used.

For example, 15 lines have changed, 5 lines in tests, 10 lines in source. 6 of these lines had code them 4 of them were just whitespace.

If 1 line of code did not have a test, 1/6 lines are not covered = 84% coverage (5/6 lines)

For other tools

Other tools which only provide the lines which do not comply have a differnt calculation method.

Same example as above, all of the lines are now considered, so 1/15 is not covered = 93% covered (14/15 lines)

Clone this wiki locally