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