From cf49efdf0e0068046685116e3eb40f7de6baa6e2 Mon Sep 17 00:00:00 2001 From: Gerson Felipe Schwinn Date: Thu, 26 Sep 2019 09:00:11 -0300 Subject: [PATCH] Solving headers already sent bug on sessions whit phpunit.phar --- lib/Cake/TestSuite/CakeTestSuiteDispatcher.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php index bb81a4518..4f997c078 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php +++ b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php @@ -170,7 +170,9 @@ class CakeTestSuiteDispatcher { } elseif (is_file($vendor . DS . 'phpunit.phar')) { $backup = $GLOBALS['_SERVER']['SCRIPT_NAME']; $GLOBALS['_SERVER']['SCRIPT_NAME'] = '-'; + ob_start(); $included = include_once $vendor . DS . 'phpunit.phar'; + ob_end_clean(); $GLOBALS['_SERVER']['SCRIPT_NAME'] = $backup; return $included; }