Does PHPUnit have functionality (or an external manner) to reflect on the target object, and either fail or markTestIncomplete()’ish on methods which it does not have a test for?
To be clear; this would be in a situation where a test suite exists. A developer adds a new method, but neglects to write a test for it. Currently, it does not affect the unit testing process what-so-ever. I am looking for a way to change this.
Thanks in advance.
PHPUnit can log code coverage data into a file with serialized data, which you can analyze later. This way you can find about untested methods:
PHPUnit 3.7 itself has no way to fail when classes/methods are untested or when code coverage is below a treshold.