@@ -118,6 +118,9 @@ public function test_forum_review_everything(): void {
118
118
$ posts = $ this ->create_post ($ options );
119
119
$ this ->check_mail_records ($ posts ['teacherpost ' ], $ posts ['studentpost ' ], 1 , 0 , MOODLEOVERFLOW_MAILED_REVIEW_SUCCESS );
120
120
121
+ if ($ CFG ->branch >= 404 ) {
122
+ sleep (1 ); // Added delay
123
+ }
121
124
$ this ->assertEquals (1 , $ this ->mailsink ->count ()); // Teacher has to approve student message.
122
125
$ this ->assertEquals (2 , $ this ->messagesink ->count ()); // Student and teacher get notification for student message.
123
126
@@ -182,6 +185,9 @@ public function test_forum_review_only_questions(): void {
182
185
$ posts = $ this ->create_post ($ options );
183
186
$ this ->check_mail_records ($ posts ['teacherpost ' ], $ posts ['studentpost ' ], 1 , 0 , MOODLEOVERFLOW_MAILED_REVIEW_SUCCESS );
184
187
188
+ if ($ CFG ->branch >= 404 ) {
189
+ sleep (1 ); // Added delay
190
+ }
185
191
$ this ->assertEquals (1 , $ this ->mailsink ->count ()); // Teacher has to approve student message.
186
192
$ this ->assertEquals (2 , $ this ->messagesink ->count ()); // Student and teacher get notification for student message.
187
193
@@ -215,6 +221,7 @@ public function test_forum_review_only_questions(): void {
215
221
* Test reviews functionality when reviewing is allowed in admin settings.
216
222
*/
217
223
public function test_forum_review_disallowed (): void {
224
+ global $ CFG ;
218
225
$ options = ['course ' => $ this ->course ->id , 'needsreview ' => review::EVERYTHING ,
219
226
'forcesubscribe ' => MOODLEOVERFLOW_FORCESUBSCRIBE , ];
220
227
@@ -223,6 +230,9 @@ public function test_forum_review_disallowed(): void {
223
230
$ posts = $ this ->create_post ($ options );
224
231
$ this ->check_mail_records ($ posts ['teacherpost ' ], $ posts ['studentpost ' ], 1 , 1 , MOODLEOVERFLOW_MAILED_SUCCESS );
225
232
233
+ if ($ CFG ->branch >= 404 ) {
234
+ sleep (1 ); // Added delay
235
+ }
226
236
$ this ->assertEquals (0 , $ this ->mailsink ->count ()); // Teacher has to approve student message.
227
237
$ this ->assertEquals (4 , $ this ->messagesink ->count ()); // Student and teacher get notification for student message.
228
238
0 commit comments