mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-73592 phpunit: Run adhoc tasks after install
This commit is contained in:
parent
b36a1f9ee0
commit
7015cbf75f
@ -132,6 +132,12 @@ class behat_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);
|
||||
}
|
||||
|
||||
// Keeps the current version of database and dataroot.
|
||||
self::store_versions_hash();
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user