Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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]

Test the helper functionality.

Copyright: 2016 Mark Nelson <markn@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 539 lines (20 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: enrol_lti_helper_testcase  - X-Ref

Test the helper functionality.

setUp()   X-Ref
Test set up.

This is executed before running any test in this file.

test_update_user_profile_image()   X-Ref
Test the update user profile image function.


test_enrol_user_max_enrolled()   X-Ref
Test that we can not enrol past the maximum number of users allowed.


test_enrol_user_enrolment_not_started()   X-Ref
Test that we can not enrol when the enrolment has not started.


test_enrol_user_enrolment_finished()   X-Ref
Test that we can not enrol when the enrolment has finished.


test_count_lti_tools()   X-Ref
Test returning the number of available tools.


test_get_lti_tools()   X-Ref
Test returning the list of available tools.


test_get_launch_url()   X-Ref
Test getting the launch url of a tool.


test_get_cartridge_url()   X-Ref
Test getting the cartridge url of a tool.


test_get_proxy_url()   X-Ref
Test getting the cartridge url of a tool.


test_get_name()   X-Ref
Test getting the name of a tool.


test_get_description()   X-Ref
Test getting the description of a tool.


test_get_icon()   X-Ref
Test getting the icon of a tool.


test_verify_cartridge_token()   X-Ref
Test verifying a cartridge token.


test_verify_proxy_token()   X-Ref
Test verifying a proxy token.


set_xpath_provider()   X-Ref
Data provider for the set_xpath test.


test_set_xpath($parameters, $expected)   X-Ref
Test set_xpath.

param: array $parameters A hash of parameters represented by a heirarchy of xpath expressions
param: string $expected The name of the fixture file containing the expected result.

test_set_xpath_incorrect_xpath()   X-Ref
Test set_xpath when an incorrect xpath expression is given.


test_create_cartridge()   X-Ref
Test create cartridge.