See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]
External tool module external functions tests
Copyright: | 2015 Juan Leyva <juan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 612 lines (26 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
mod_lti_external_testcase:: (26 methods):
setUp()
setup_test_data()
generate_tool_type()
generate_tool_proxy()
test_mod_lti_get_tool_proxies()
test_mod_lti_get_orphaned_tool_proxies()
test_get_tool_launch_data()
test_mod_lti_get_ltis_by_courses()
test_view_lti_invalid_instanceid()
test_view_lti_no_enrolment()
test_view_lti_no_capability()
test_view_lti()
test_mod_lti_create_tool_proxy()
test_mod_lti_create_tool_proxy_duplicateurl()
test_mod_lti_create_tool_proxy_without_capability()
test_mod_lti_delete_tool_proxy()
test_mod_lti_get_tool_proxy_registration_request()
test_mod_lti_get_tool_types()
test_mod_lti_create_tool_type()
test_mod_lti_create_tool_type_nonexistant_file()
test_mod_lti_create_tool_type_bad_file()
test_mod_lti_create_tool_type_without_capability()
test_mod_lti_update_tool_type()
test_mod_lti_delete_tool_type()
test_mod_lti_delete_tool_type_without_capability()
test_mod_lti_is_cartridge()
Class: mod_lti_external_testcase - X-Ref
External tool module external functions testssetUp() X-Ref |
Set up for every test |
setup_test_data() X-Ref |
Sets up some basic test data including course, users, roles, and an lti instance, for use in some tests. return: array |
generate_tool_type(string $uniqueid, int $toolproxyid = null) X-Ref |
Generate a tool type. param: string $uniqueid Each tool type needs a different base url. Provide a unique string for every tool type created. param: int|null $toolproxyid Optional proxy to associate with tool type. return: stdClass A tool type. |
generate_tool_proxy(string $uniqueid) X-Ref |
Generate a tool proxy. param: string $uniqueid Each tool proxy needs a different reg url. Provide a unique string for every tool proxy created. return: stdClass A tool proxy. |
test_mod_lti_get_tool_proxies() X-Ref |
Test get_tool_proxies. |
test_mod_lti_get_orphaned_tool_proxies() X-Ref |
Test get_tool_proxies with orphaned proxies only. |
test_get_tool_launch_data() X-Ref |
Test get_tool_launch_data. |
test_mod_lti_get_ltis_by_courses() X-Ref |
Test get_ltis_by_courses. |
test_view_lti_invalid_instanceid() X-Ref |
Test view_lti with an invalid instance id. |
test_view_lti_no_enrolment() X-Ref |
Test view_lti as a user who is not enrolled in the course. |
test_view_lti_no_capability() X-Ref |
Test view_lti for a user without the mod/lti:view capability. |
test_view_lti() X-Ref |
Test view_lti for a user with the mod/lti:view capability in the course. |
test_mod_lti_create_tool_proxy() X-Ref |
Test create_tool_proxy. |
test_mod_lti_create_tool_proxy_duplicateurl() X-Ref |
Test create_tool_proxy with a duplicate url. |
test_mod_lti_create_tool_proxy_without_capability() X-Ref |
Test create_tool_proxy for a user without the required capability. |
test_mod_lti_delete_tool_proxy() X-Ref |
Test delete_tool_proxy. |
test_mod_lti_get_tool_proxy_registration_request() X-Ref |
Test get_tool_proxy_registration_request. |
test_mod_lti_get_tool_types() X-Ref |
Test get_tool_types. |
test_mod_lti_create_tool_type() X-Ref |
Test create_tool_type. |
test_mod_lti_create_tool_type_nonexistant_file() X-Ref |
Test create_tool_type failure from non existent file. |
test_mod_lti_create_tool_type_bad_file() X-Ref |
Test create_tool_type failure from xml that is not a cartridge. |
test_mod_lti_create_tool_type_without_capability() X-Ref |
Test create_tool_type as a user without the required capability. |
test_mod_lti_update_tool_type() X-Ref |
Test update_tool_type. |
test_mod_lti_delete_tool_type() X-Ref |
Test delete_tool_type for a user with the required capability. |
test_mod_lti_delete_tool_type_without_capability() X-Ref |
Test delete_tool_type for a user without the required capability. |
test_mod_lti_is_cartridge() X-Ref |
Test is_cartridge. |