Merge pull request #13683 from gersonfs/2.x

Solving headers already sent bug on sessions whit phpunit.phar
This commit is contained in:
Mark Story 2019-09-26 15:10:03 -04:00 committed by GitHub
commit d2e1681eb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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