protected function sub_test_grade_category_set_locked() { $category = new grade_category($this->grade_categories[0]); $this->assertTrue(method_exists($category, 'set_locked')); //will return false as cannot lock a grade that needs updating $this->assertFalse($category->set_locked(1)); grade_regrade_final_grades($this->courseid); //get the category from the db again $category = new grade_category($this->grade_categories[0]); $this->assertTrue($category->set_locked(1)); }