See Release Notes
Long Term Support Release
Tests for the the Forum gradeitem.
Copyright: | Andrew Nicols <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 277 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 1 file mod/forum/tests/generator_trait.php |
forum_gradeitem_test:: (7 methods):
test_get_grade_for_user_exists()
test_user_has_grade()
test_get_and_store_grade_for_user_with_simple_direct_grade()
test_get_and_store_grade_for_user_with_rubric()
test_should_grade_only_active_users()
should_grade_only_active_users_provider()
get_forum_instance()
Class: forum_gradeitem_test - X-Ref
Tests for the the Forum gradeitem.test_get_grade_for_user_exists() X-Ref |
Test fetching of a grade for a user when the grade has been created. |
test_user_has_grade() X-Ref |
Test fetching of a grade for a user when the grade has been created. |
test_get_and_store_grade_for_user_with_simple_direct_grade() X-Ref |
Ensure that it is possible to get, and update, a grade for a user when simple direct grading is in use. |
test_get_and_store_grade_for_user_with_rubric() X-Ref |
Ensure that it is possible to get, and update, a grade for a user when a rubric is in use. |
test_should_grade_only_active_users(bool $showonlyactiveenrolconfig, bool $showonlyactiveenrolpreference,bool $viewsuspendeduserscapability, bool $expected) X-Ref |
Test the logic in the should_grade_only_active_users() method. param: bool $showonlyactiveenrolconfig Whether the 'grade_report_showonlyactiveenrol' is enabled or not. param: bool $showonlyactiveenrolpreference Whether the 'grade_report_showonlyactiveenrol' preference is enabled or not. param: bool $viewsuspendeduserscapability Whether the 'moodle/course:viewsuspendedusers' capability is allowed or not. param: bool $expected The expected result. |
should_grade_only_active_users_provider() X-Ref |
Data provider for test_should_grade_only_active_users. return: array |
get_forum_instance(array $config = []) X-Ref |
Get a forum instance. param: array $config return: forum_entity |