views:

17

answers:

1

Every time I run a single unit test in PHPUnit, a code coverage report is also generated. I have an older computer here at work, and if I could disable the code coverage when I don't need it, that would put less strain on my CPU.

Is there a way to disable the code coverage on a per-test basis? I couldn't find any command-line switch that would do it.

+1  A: 

How about making a copy of your phpunit.xml, removing the <logging> stanza from it, then doing:

phpunit --configuration new.xml
Alex Howansky
Wow, I didn't realize it was that simple. I guess I can use a different configuration file when I'm running a single test vs. when I'm running the whole suite.
Eugene M
I ended up paring down my xml file to just <phpunit bootstrap="./TestHelper.php" colors="true"/>... now it runs lightning fast. Wish I'd known this sooner!
Eugene M