It might have been too tedious to do it this way anyhow. The next best thing is to have someone other implement the coverage part for you. I decided to look into the sources of existing testing tools providing support for coverage. PHPUnit gave me the needed clue, it uses Xdebug to handle coverage. I suppose this is the way I should handle it too. It is easy to get line coverage this way. Checking out branch coverage might take some extra work but that's alright.
During my research I found some useful sites. In addition I have listed some related material:
- http://agilesoftwaredevelopment.com/blog/pbielicki/code-coverage-against-unused-code - Nice explanation of what it's about. Remember to read comments too!
- http://misko.hevery.com/ - Heaps of useful information about testing.
- http://homepage.mac.com/hey.you/lessons.html - Hints that help you to push your code towards 100% test coverage. Note the importance of mocks!
- http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata - Classic Bowling Game kata. Read this if you are still new to testing and related methodologies.