The policy introduced for T206476 creates a subtle failure mode: any test
writing to stdout will cause headers to be sent, causing later tests to
fail when they try to call header().
Instead, call ob_start() to intercept test output. Any buffered output is
still seen when PHPUnit exits.