Differences Between: [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]
Testing the H5P helper.
Copyright: | 2019 Sara Arjona <sara@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 427 lines (15 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
helper_test:: (11 methods):
test_display_options()
display_options_provider()
test_save_h5p_missing_libraries()
test_save_h5p_existing_libraries()
test_save_h5p_invalid_file()
test_can_deploy_package()
test_can_update_library()
test_get_messages()
test_get_export_info()
test_parse_js_array()
parse_js_array_provider()
Class: helper_test - X-Ref
Test class covering the H5P helper.test_display_options(bool $frame, bool $export, bool $embed, bool $copyright, int $expected) X-Ref |
Test the behaviour of get_display_options(). param: bool $frame Whether the frame should be displayed or not param: bool $export Whether the export action button should be displayed or not param: bool $embed Whether the embed action button should be displayed or not param: bool $copyright Whether the copyright action button should be displayed or not param: int $expected The expectation with the displayoptions value |
display_options_provider() X-Ref |
Data provider for test_get_display_options(). return: array |
test_save_h5p_missing_libraries() X-Ref |
Test the behaviour of save_h5p() when there are some missing libraries in the system. |
test_save_h5p_existing_libraries() X-Ref |
Test the behaviour of save_h5p() when the libraries exist in the system. |
test_save_h5p_invalid_file() X-Ref |
Test the behaviour of save_h5p() when the .h5p file is invalid. |
test_can_deploy_package() X-Ref |
Test the behaviour of can_deploy_package(). |
test_can_update_library() X-Ref |
Test the behaviour of can_update_library(). |
test_get_messages() X-Ref |
Test the behaviour of get_messages(). |
test_get_export_info() X-Ref |
Test the behaviour of get_export_info(). |
test_parse_js_array(string $content, array $expected) X-Ref |
Test the parse_js_array function with a range of content. param: string $content param: array $expected |
parse_js_array_provider() X-Ref |
Data provider for test_parse_js_array(). return: array |