mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
MDL-37324 fix phpunit and behat SESSION and USER setup
This commit is contained in:
parent
c925e4fa8e
commit
de230fd359
3 changed files with 14 additions and 8 deletions
|
@ -765,8 +765,10 @@ if (empty($CFG->sessiontimeout)) {
|
|||
$CFG->sessiontimeout = 7200;
|
||||
}
|
||||
\core\session\manager::start();
|
||||
$SESSION = &$_SESSION['SESSION'];
|
||||
$USER = &$_SESSION['USER'];
|
||||
if (!PHPUNIT_TEST and !defined('BEHAT_TEST')) {
|
||||
$SESSION =& $_SESSION['SESSION'];
|
||||
$USER =& $_SESSION['USER'];
|
||||
}
|
||||
|
||||
// Late profiling, only happening if early one wasn't started
|
||||
if (!empty($CFG->profilingenabled)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue