Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]
External comment functions unit tests
Copyright: | 2015 Juan Leyva <juan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 460 lines (17 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
core_comment_externallib_testcase:: (13 methods):
setUp()
setup_course_and_users_basic()
test_get_comments()
test_add_comments_not_enabled_site_level()
test_add_comments_not_enabled_module_level()
test_add_comments_single()
test_add_comments_multiple_contains_invalid()
test_add_comments_multiple_all_valid()
test_add_comments_invalid_area()
test_delete_comments_invalid_comment_id()
test_delete_comments_own_user()
test_delete_comment_other_student()
test_delete_comments_as_teacher()
Class: core_comment_externallib_testcase - X-Ref
External comment functions unit testssetUp() X-Ref |
Tests set up |
setup_course_and_users_basic() X-Ref |
Helper used to set up a course, with a module, a teacher and two students. return: array the array of records corresponding to the course, teacher, and students. |
test_get_comments() X-Ref |
Test get_comments |
test_add_comments_not_enabled_site_level() X-Ref |
Test add_comments not enabled site level |
test_add_comments_not_enabled_module_level() X-Ref |
Test add_comments not enabled module level |
test_add_comments_single() X-Ref |
Test add_comments |
test_add_comments_multiple_contains_invalid() X-Ref |
Test add_comments when one of the comments contains invalid data and cannot be created. This simply verifies that the entire operation fails. |
test_add_comments_multiple_all_valid() X-Ref |
Test add_comments when one of the comments contains invalid data and cannot be created. This simply verifies that the entire operation fails. |
test_add_comments_invalid_area() X-Ref |
Test add_comments invalid area |
test_delete_comments_invalid_comment_id() X-Ref |
Test delete_comment invalid comment. |
test_delete_comments_own_user() X-Ref |
Test delete_comment own user. |
test_delete_comment_other_student() X-Ref |
Test delete_comment other student. |
test_delete_comments_as_teacher() X-Ref |
Test delete_comment as teacher. |