Call ob_start() before running tests
authorTim Starling <tstarling@wikimedia.org>
Mon, 25 May 2020 03:48:42 +0000 (13:48 +1000)
committersbassett <sbassett@wikimedia.org>
Mon, 1 Jun 2020 19:28:40 +0000 (14:28 -0500)
commitaf0e7338dd24ed7e7e15cc7c47b5a6ba0e376bc0
tree86a984337eaa1cf17963072fcb1a20296a8235e9
parenta9beb409f957bec65b8fced623e9aa3d7b7c65a9
Call ob_start() before running tests

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.

Bug: T206476
Change-Id: Id085efeab67d1e700ffcbf37868b5107e3a7e5d5
tests/phpunit/phpunit.php