move setting a working session.save_path to bootstrap, to avoid tons of warnings set it cant by changed after output/headers sent

This commit is contained in:
Ralf Becker 2020-03-05 10:45:07 +01:00
parent 63b69d77d0
commit 5cedd472f9
2 changed files with 6 additions and 5 deletions

View File

@ -125,11 +125,6 @@ abstract class LoggedInTest extends TestCase
'passwd_type' => 'text',
);
if (ini_get('session.save_handler') == 'files' && !is_writable(ini_get('session.save_path')) && is_dir('/tmp') && is_writable('/tmp'))
{
ini_set('session.save_path','/tmp'); // regular users may have no rights to apache's session dir
}
if(!$info)
{
$info = array(

View File

@ -24,6 +24,12 @@ if (!class_exists('\PHPUnit\Framework\TestCase') && class_exists('\PHPUnit_Frame
// Needed to let Cache work
$GLOBALS['egw_info']['server']['temp_dir'] = '/tmp';
$GLOBALS['egw_info']['server']['install_id'] = 'PHPUnit test';
// setting a working session.save_path
if (ini_get('session.save_handler') === 'files' && !is_writable(ini_get('session.save_path')) &&
is_dir('/tmp') && is_writable('/tmp'))
{
ini_set('session.save_path','/tmp'); // regular users may have no rights to apache's session dir
}
// Symlink api/src/fixtures/apps/* to root
foreach(scandir($path=__DIR__.'/../api/tests/fixtures/apps') as $app)