You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose PHPUnit_Framework_RiskyTestError only be thrown if ob_get_level() > $this->outputBufferingLevel (or allow some other mechanism to allow this).
I do agree that a test that does not close its own output buffers should be considered risky, but code that empties all output buffers seems pretty reasonable to me.
E.g. 1: A framework wants to collect output to build a formal Response object.
E.g. 2: TestCase::stopOutputBuffering() empties all buffers, why is it just OK for PHPUnit to do it? ;)
If you're amenable to the idea I can send a PR.
The text was updated successfully, but these errors were encountered:
I propose
PHPUnit_Framework_RiskyTestError
only be thrown ifob_get_level() > $this->outputBufferingLevel
(or allow some other mechanism to allow this).I do agree that a test that does not close its own output buffers should be considered risky, but code that empties all output buffers seems pretty reasonable to me.
E.g. 1: A framework wants to collect output to build a formal Response object.
E.g. 2:
TestCase::stopOutputBuffering()
empties all buffers, why is it just OK for PHPUnit to do it? ;)If you're amenable to the idea I can send a PR.
The text was updated successfully, but these errors were encountered: