CodeCoverage: should data/temporary be ignored?
Currently the testing web controller has a flag to enable code coverage.
However the code coverage is correctly limited to the package we are testing (working as intended). But: The code coverage seems to consume the data/temporary folder too. The manual says that unit testing should be done by calling constructors directly and not using any aop proxies but using mock objects and injecting them into the tested classes. That's rather fine.
Due to a bug within phpunit itself currently the code coverage feature will report notices as soon as it sees the data/temporary package. PHPUnit was fixed.
See PHPUnit issue at http://github.com/sebastianbergmann/phpunit/issues/closed#issue/54
I suggest updating Flow3's PHPUnit package. And maybe the data directory should be blacklisted so that PHPUnit does not try code coverage on the temporary data.
Updated by Karsten Dambekalns about 11 years ago
- Status changed from New to Accepted
- Assignee set to Karsten Dambekalns
- Target version set to 1.0 alpha 13
- % Done changed from 0 to 80
We no longer use the PHPUnit FLOW3 package, but rely on PHPUnit 3.5 (at least). In addition the configuration for PHPUnit when used from the command line or through Phing makes correct use of whitelisting now.
The web test runner, well, it should be adjusted, probably.