Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Class: helper_test  - 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.