Skip to content

Commit

Permalink
MDL-72085 core_phpunit: reset session notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriim committed Jul 30, 2021
1 parent a0942c9 commit 07e6488
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/phpunit/classes/util.php
Expand Up @@ -203,6 +203,9 @@ public static function reset_all_data($detectchanges = false) {
$ME = null;
$SCRIPT = null;
$FILTERLIB_PRIVATE = null;
if (!empty($SESSION->notifications)) {
$SESSION->notifications = [];
}

// Empty sessison and set fresh new not-logged-in user.
\core\session\manager::init_empty_session();
Expand Down

0 comments on commit 07e6488

Please sign in to comment.