Clean up output buffers between tests.
authorPeter Haight <peterh@giantrabbit.com>
Sat, 6 Sep 2014 20:06:41 +0000 (13:06 -0700)
committerPeter Haight <peterh@giantrabbit.com>
Sat, 6 Sep 2014 20:06:41 +0000 (13:06 -0700)
commit7325297428e94359fcf0be620b1127f52465606c
treedaab2187f8407645a887cdd22178e9a2a40913d5
parentfdfd59ccd77f9b06547204a505b67e35bf6596d7
Clean up output buffers between tests.

Some of the tests I was running were erroring with a deprecation
warning. That was happening inside a Smarty template and the Smarty
stuff makes heavy use of ob_start and friends. When an error happens
inside an ob_start, the corresponding ob_end_clean isn't happening and
somewhere else in phpunit the output gets flushed. This causes the
output to get flushed to the screen which messes up the display of the
results of running phpunit.

This fix has us clear out all of the output buffers (if any) in the
tearDown for every test. That seems to fix this problem.
tests/phpunit/CiviTest/CiviUnitTestCase.php