MDL-79338 core: add support for hook callback redirection in tests

This commit is contained in:
Petr Skoda
2023-09-14 11:47:52 +02:00
parent f42cc76a78
commit b2a2d3dc66
3 changed files with 60 additions and 0 deletions
+3
View File
@@ -104,6 +104,9 @@ class phpunit_util extends testing_util {
public static function reset_all_data($detectchanges = false) {
global $DB, $CFG, $USER, $SITE, $COURSE, $PAGE, $OUTPUT, $SESSION, $FULLME, $FILTERLIB_PRIVATE;
// Stop all hook redirections.
\core\hook\manager::get_instance()->phpunit_stop_redirections();
// Stop any message redirection.
self::stop_message_redirection();