MDL-73592 phpunit: Run adhoc tasks after install

This commit is contained in:
Shamim Rezaie
2022-02-18 02:09:49 +11:00
parent b36a1f9ee0
commit 7015cbf75f
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -477,6 +477,12 @@ class phpunit_util extends testing_util {
set_config('curlsecurityblockedhosts', '');
set_config('curlsecurityallowedport', '');
// Execute all the adhoc tasks.
while ($task = \core\task\manager::get_next_adhoc_task(time())) {
$task->execute();
\core\task\manager::adhoc_task_complete($task);
}
// We need to keep the installed dataroot filedir files.
// So each time we reset the dataroot before running a test, the default files are still installed.
self::save_original_data_files();