Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Class: externallib_test  - X-Ref

External tool module external functions tests

setUp()   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

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.