Commit 44ab9091 authored by Marc Egger's avatar Marc Egger
Browse files

Merge remote-tracking branch 'origin/B7455PHPUnitTestsFail' into B7455PHPUnitTestsFail

parents 672febb4 89e9bbb8
Pipeline #1150 passed with stage
in 1 minute and 41 seconds
......@@ -84,6 +84,10 @@ class Logger {
return ('../../../../../' . $filename);
}
}
// phpunit test
if (strpos(getcwd(), '/qfq/qfq/tests/phpunit') !== false) {
return ('../../../../../../' . $filename);
}
return $filename;
}
......
......@@ -419,8 +419,11 @@ class Config {
*/
public static function checkSessionTimeout($timeout) {
// php.ini cookie life time is zero in a phpunit test
$isUnitTest = defined('PHPUNIT_COMPOSER_INSTALL') || defined('__PHPUNIT_PHAR__');
if (ini_get('session.gc_maxlifetime') < $timeout ||
ini_get('session.cookie_lifetime') < $timeout
(ini_get('session.cookie_lifetime') < $timeout && !$isUnitTest)
) {
throw new qfq\UserFormException ("The specified timeout of $timeout seconds is higher than the PHP config 'session.gc_maxlifetime' and/or 'session.cookie_lifetime'");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment