i'm implementing some tests for a site.
In a particular test, this result occurred:
"message": "Risky Test: Test code or tested code did not (only) close its own output buffers",
}R 3 / 3 (100%)
Time: 25.76 seconds, Memory: 59.25MB
There was 1 risky test:
Test code or tested code did not (only) close its own output buffers
OK, but incomplete, skipped, or risky tests!
The message is reported if PHPUnit detects that the output buffering level at the end of a test method is different from the level at the beginning. This is due to the fact that it uses its own output buffer and checks that the test produces no output.
Because there is no option in PHPUnit to ignore this, you need to find the reason why the output buffering in your code was started but not ended (or ended too much) and fix that.
That might be really difficult to achieve because there is no hint, where output buffering is started, but you could use a full-text search on your source code (and libs) to identify candidates. Then look for Exceptions, which might break the normal program flow and so prevent
ob_end_flush() (or similar) to be called.