@@ -5100,19 +5100,22 @@ public function test_course_get_recent_courses() {
51005100 */
51015101 public function provider_course_modules_pending_deletion () {
51025102 return [
5103- ['forum ' , true ],
5104- ['assign ' , true ],
5103+ ['forum ' , false , true ],
5104+ ['assign ' , false , true ],
5105+ ['forum ' , true , false ],
5106+ ['assign ' , true , true ],
51055107 ];
51065108 }
51075109
51085110 /**
51095111 * Tests the function course_modules_pending_deletion.
51105112 *
51115113 * @param string $module The module we want to test with
5114+ * @param bool $gradable The value to pass to the gradable argument of the course_modules_pending_deletion function
51125115 * @param bool $expected The expected result
51135116 * @dataProvider provider_course_modules_pending_deletion
51145117 */
5115- public function test_course_modules_pending_deletion (string $ module , bool $ expected ) {
5118+ public function test_course_modules_pending_deletion (string $ module , bool $ gradable , bool $ expected ) {
51165119 $ this ->resetAfterTest ();
51175120
51185121 // Ensure recyclebin is enabled.
@@ -5125,6 +5128,6 @@ public function test_course_modules_pending_deletion(string $module, bool $expec
51255128 $ moduleinstance = $ generator ->create_module ($ module , array ('course ' => $ course ->id ));
51265129
51275130 course_delete_module ($ moduleinstance ->cmid , true ); // Try to delete the instance asynchronously.
5128- $ this ->assertEquals ($ expected , course_modules_pending_deletion ($ course ->id ));
5131+ $ this ->assertEquals ($ expected , course_modules_pending_deletion ($ course ->id , $ gradable ));
51295132 }
51305133}
0 commit comments