title: how to run php unit multiple times and concatenate the coverage report?
body: <p>My tested code is full of final static classes. and while we can't refactor it for better tests, i have a intermediate solution that runs several small tests on it's own process. and all works fine. but i get no coverage report as one overwrite the other.</p>
  
  <p>I'm currently generating the report in clover, but i am very open to other reports.</p>
  
  <p>my tests only work when phpunit is run as:</p>
  
  <pre><code>/home/y/bin/phpunit --coverage-html clover --coverage-clover clover/report.xml --include-path src/  tests/aTest.php
  OK (1 test, 1 assertions)
  /home/y/bin/phpunit --coverage-html clover --coverage-clover clover/report.xml --include-path src/  tests/bTest.php
  OK (1 test, 1 assertions)
  /home/y/bin/phpunit --coverage-html clover --coverage-clover clover/report.xml --include-path src/  tests/cTest.php
  OK (1 test, 1 assertions)
  </code></pre>
  
  <p>But that will result in each run wipping the report from the previous. So i only get a report for the last one. And if i try to run them as phpunit expects to generate the full report, i have the failure because all my classes include their own static ones.</p>
  
  <pre><code>/home/y/bin/phpunit --coverage-html clover --coverage-clover clover/report.xml --include-path src/  tests/
  . (first test pass)
  PHP Fatal error:  Cannot redeclare class Something
  make[1]: *** [phpunit_run] Error 255
  </code></pre>
  
  <p>(but the above will fail even with <code>--process-isolation --no-globals-backup</code> because are not exactly what they mean...) -- This is NOT yet another question on how to get properly process isolation on php unit. i'm fine running it several times, i just want a full coverage report :)</p>
  
  <p>Is there any way to get the tests to run correctly (i.e. on several process to avoid tainted global class declaration space) like the first code block, but still have comprehensive code coverage report?</p>
  
  <p>thank you!</p>