diff --git a/api/tests/LoggedInTest.php b/api/tests/LoggedInTest.php index abc672de8c..0395df39ec 100644 --- a/api/tests/LoggedInTest.php +++ b/api/tests/LoggedInTest.php @@ -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( diff --git a/doc/phpunit_bootstrap.php b/doc/phpunit_bootstrap.php index c8bb3af6e1..f47530790f 100644 --- a/doc/phpunit_bootstrap.php +++ b/doc/phpunit_bootstrap.php @@ -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)