Solving headers already sent bug on sessions whit phpunit.phar

This commit is contained in:
Gerson Felipe Schwinn 2019-09-26 09:00:11 -03:00
parent 46068ac65b
commit cf49efdf0e

View file

@ -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;
}