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 class covering the h5p data generator class.
Copyright: | 2019 Mihail Geshoski <mihail@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 571 lines (20 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
generator_testcase:: (14 methods):
setUp()
test_generate_h5p_data_no_files_created_return_data()
test_generate_h5p_data_files_created_return_data()
test_generate_h5p_data_files_creation()
test_generate_h5p_data_files_creation_provider()
test_create_library_record()
test_create_h5p_record()
test_create_h5p_record_provider()
test_create_contents_libraries_record()
test_create_contents_libraries_record_provider()
test_create_library_dependency_record()
test_create_library_dependency_record_provider()
test_create_content_file()
test_create_content_file_provider()
Class: generator_testcase - X-Ref
Generator testcase for the core_grading generator.setUp() X-Ref |
Tests set up. |
test_generate_h5p_data_no_files_created_return_data() X-Ref |
Test the returned data of generate_h5p_data() when the method is called without requesting creation of library files. |
test_generate_h5p_data_files_created_return_data() X-Ref |
Test the returned data of generate_h5p_data() when the method requests creation of library files. |
test_generate_h5p_data_files_creation(bool $createlibraryfiles, bool $expected) X-Ref |
Test the behaviour of generate_h5p_data(). Test whether library files are created or not on filesystem depending what the method defines. param: bool $createlibraryfiles Whether to create library files on the filesystem param: bool $expected The expectation whether the files have been created or not |
test_generate_h5p_data_files_creation_provider() X-Ref |
Data provider for test_generate_h5p_data_files_creation(). return: array |
test_create_library_record() X-Ref |
Test the behaviour of create_library_record(). Test whether the library data is properly saved in the database. |
test_create_h5p_record(array $h5pdata, \stdClass $expected) X-Ref |
Test the behaviour of create_h5p_record(). Test whather the h5p content data is properly saved in the database. param: array $h5pdata The h5p content data param: \stdClass $expected The expected saved data |
test_create_h5p_record_provider() X-Ref |
Data provider for test_create_h5p_record(). return: array |
test_create_contents_libraries_record(array $contentslibrariestdata, \stdClass $expected) X-Ref |
Test the behaviour of create_contents_libraries_record(). Test whether the contents libraries are properly saved in the database. param: array $contentslibrariestdata The h5p contents libraries data. param: \stdClass $expected The expected saved data. |
test_create_contents_libraries_record_provider() X-Ref |
Data provider for test_create_contents_libraries_record(). return: array |
test_create_library_dependency_record(array $librarydependencydata, \stdClass $expected) X-Ref |
Test the behaviour of create_library_dependency_record(). Test whether the contents libraries are properly saved in the database. param: array $librarydependencydata The library dependency data. param: \stdClass $expected The expected saved data. |
test_create_library_dependency_record_provider() X-Ref |
Data provider for test_create_library_dependency_record(). return: array |
test_create_content_file($filedata, $expecteddata) X-Ref |
Test the behaviour of create_content_file(). Test whether a file belonging to a content is created. param: array $filedata Data from the file to be created. param: array $expecteddata Data expected.Data from the file to be created. |
test_create_content_file_provider() X-Ref |
Data provider for test_create_content_file(). Data from different files to be created. return: array |