@@ -66,9 +66,6 @@ public function test_pre_course_module_delete_hook() {
66
66
// Delete the course module.
67
67
course_delete_module ($ this ->quiz ->cmid );
68
68
69
- // Now, run the course module deletion adhoc task.
70
- \phpunit_util::run_all_adhoc_tasks ();
71
-
72
69
// Check the course module is now in the recycle bin.
73
70
$ this ->assertEquals (1 , $ DB ->count_records ('tool_recyclebin_course ' ));
74
71
@@ -110,9 +107,6 @@ public function test_delete() {
110
107
// Delete the course module.
111
108
course_delete_module ($ this ->quiz ->cmid );
112
109
113
- // Now, run the course module deletion adhoc task.
114
- \phpunit_util::run_all_adhoc_tasks ();
115
-
116
110
// Try purging.
117
111
$ recyclebin = new \tool_recyclebin \course_bin ($ this ->course ->id );
118
112
foreach ($ recyclebin ->get_items () as $ item ) {
@@ -135,9 +129,6 @@ public function test_cleanup_task() {
135
129
// Delete the quiz.
136
130
course_delete_module ($ this ->quiz ->cmid );
137
131
138
- // Now, run the course module deletion adhoc task.
139
- \phpunit_util::run_all_adhoc_tasks ();
140
-
141
132
// Set deleted date to the distant past.
142
133
$ recyclebin = new \tool_recyclebin \course_bin ($ this ->course ->id );
143
134
foreach ($ recyclebin ->get_items () as $ item ) {
@@ -151,9 +142,6 @@ public function test_cleanup_task() {
151
142
152
143
course_delete_module ($ book ->cmid );
153
144
154
- // Now, run the course module deletion adhoc task.
155
- \phpunit_util::run_all_adhoc_tasks ();
156
-
157
145
// Should have 2 items now.
158
146
$ this ->assertEquals (2 , count ($ recyclebin ->get_items ()));
159
147
@@ -223,7 +211,6 @@ public function test_coursemodule_restore_with_userdata($settings) {
223
211
// Delete quiz.
224
212
$ cm = get_coursemodule_from_instance ('quiz ' , $ this ->quiz ->id );
225
213
course_delete_module ($ cm ->id );
226
- \phpunit_util::run_all_adhoc_tasks ();
227
214
$ quizzes = get_coursemodules_in_course ('quiz ' , $ this ->course ->id );
228
215
$ this ->assertEquals (0 , count ($ quizzes ));
229
216
@@ -260,9 +247,6 @@ public function test_coursemodule_restore_with_activity_setting_disabled() {
260
247
// Delete the course module.
261
248
course_delete_module ($ this ->quiz ->cmid );
262
249
263
- // Now, run the course module deletion adhoc task.
264
- \phpunit_util::run_all_adhoc_tasks ();
265
-
266
250
// Check there is no items in the recycle bin.
267
251
$ recyclebin = new \tool_recyclebin \course_bin ($ this ->course ->id );
268
252
$ this ->assertEquals (0 , count ($ recyclebin ->get_items ()));
@@ -293,7 +277,6 @@ public function test_coursemodule_restore_without_userdata($settings) {
293
277
// Delete quiz.
294
278
$ cm = get_coursemodule_from_instance ('quiz ' , $ this ->quiz ->id );
295
279
course_delete_module ($ cm ->id );
296
- \phpunit_util::run_all_adhoc_tasks ();
297
280
$ quizzes = get_coursemodules_in_course ('quiz ' , $ this ->course ->id );
298
281
$ this ->assertEquals (0 , count ($ quizzes ));
299
282
0 commit comments