See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 39 and 401]
Tests for the tool_provider class.
Copyright: | 2016 Jun Pataleta <jun@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 670 lines (22 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
tool_provider_test:: (22 methods):
setUp()
test_constructor_with_non_existent_tool()
test_constructor()
test_handle_request_no_request_data()
test_on_error()
test_on_register_no_consumer()
test_on_register_no_return_url()
test_on_register_failed()
test_on_register()
test_on_launch_no_frame_embedding()
test_on_launch_with_frame_embedding()
test_on_launch_with_invalid_secret_and_no_proxy()
test_on_launch_proxy_with_invalid_launch_url()
test_on_launch_proxy_with_valid_launch_url()
test_on_launch_proxy_with_invalid_message_type()
test_on_launch_with_user_image_from_resource_link()
test_on_launch_user_enrolment()
test_on_launch_no_consumer()
test_on_launch_invalid_consumer()
test_map_tool_to_consumer()
test_map_tool_to_consumer_no_consumer()
build_dummy_tp()
dummy_tool_provider:: (4 methods):
onError()
onLaunch()
onRegister()
get_error_output()
dummy_tool_consumer:: (2 methods):
__construct()
doServiceRequest()
Class: tool_provider_test - X-Ref
Tests for the tool_provider class.setUp() X-Ref |
Test set up. This is executed before running any tests in this file. |
test_constructor_with_non_existent_tool() X-Ref |
Passing non-existent tool ID. |
test_constructor() X-Ref |
Constructor test. |
test_handle_request_no_request_data() X-Ref |
Test for handle request. |
test_on_error() X-Ref |
Test for tool_provider::onError(). |
test_on_register_no_consumer() X-Ref |
Test for tool_provider::onRegister() with no tool consumer set. |
test_on_register_no_return_url() X-Ref |
Test for tool_provider::onRegister() without return URL. |
test_on_register_failed() X-Ref |
Test for tool_provider::onRegister() when registration fails. |
test_on_register() X-Ref |
Test for tool_provider::onRegister() when registration succeeds. |
test_on_launch_no_frame_embedding() X-Ref |
Test for tool_provider::onLaunch(). |
test_on_launch_with_frame_embedding() X-Ref |
Test for tool_provider::onLaunch(). |
test_on_launch_with_invalid_secret_and_no_proxy() X-Ref |
Test for tool_provider::onLaunch() with invalid secret and no tool proxy (for LTI 1 launches). |
test_on_launch_proxy_with_invalid_launch_url() X-Ref |
Test for tool_provider::onLaunch() with invalid launch URL. |
test_on_launch_proxy_with_valid_launch_url() X-Ref |
Test for tool_provider::onLaunch() with invalid launch URL. |
test_on_launch_proxy_with_invalid_message_type() X-Ref |
Test for tool_provider::onLaunch() for a request with message type other than basic-lti-launch-request. |
test_on_launch_with_user_image_from_resource_link() X-Ref |
Test for tool_provider::onLaunch() to verify that a user image can be set from the resource link's custom_user_image setting. |
test_on_launch_user_enrolment() X-Ref |
Test for tool_provider::onLaunch() to verify that a LTI user has been enrolled. |
test_on_launch_no_consumer() X-Ref |
Test for tool_provider::onLaunch() when the consumer object has not been set. |
test_on_launch_invalid_consumer() X-Ref |
Test for tool_provider::onLaunch() when we have a non-existent consumer data. |
test_map_tool_to_consumer() X-Ref |
Test for tool_provider::map_tool_to_consumer(). |
test_map_tool_to_consumer_no_consumer() X-Ref |
Test for tool_provider::map_tool_to_consumer(). |
build_dummy_tp($secret = null, $proxy = null, $resourcelinksettings = null) X-Ref |
Builds a dummy tool provider object. param: string $secret Consumer secret. param: array|\stdClass $proxy Tool proxy data. param: null $resourcelinksettings Key-value array for resource link settings. return: dummy_tool_provider |
Class: dummy_tool_provider - X-Ref
Class dummy_tool_provider.onError() X-Ref |
Exposes tool_provider::onError(). |
onLaunch() X-Ref |
Exposes tool_provider::onLaunch(). |
onRegister() X-Ref |
Exposes tool_provider::onRegister(). |
get_error_output() X-Ref |
Expose protected variable errorOutput. return: string |
Class: dummy_tool_consumer - X-Ref
Class dummy_tool_consumer__construct($key = null, $dataconnector = null, $autoenable = false, $success = false) X-Ref |
dummy_tool_consumer constructor. param: null|string $key param: mixed|null $dataconnector param: bool $autoenable param: bool $success |
doServiceRequest($service, $method, $format, $data) X-Ref |
Override ToolConsumer::doServiceRequest() to simulate sending/receiving data to and from the tool consumer. param: object $service param: string $method param: string $format param: mixed $data return: HTTPMessage |