civicrm/civicrm-core — pull request #4066 by Dawnthorn (2014-09-06 20:18:10+00:00)
Title: 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.