Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402]
Test for extensions manager.
Copyright: | 2020 Amaia Anabitarte <amaia@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 674 lines (26 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
contentbank_test:: (19 methods):
setupBeforeClass()
get_extension_provider()
test_get_extension()
get_extension_supporters_provider()
test_get_extension_supporter_for_admins()
test_get_extension_supporter_for_users()
test_get_extension_supporter_for_teachers()
test_get_extension_supporter()
test_search_contents()
search_contents_provider()
test_create_content_from_file()
test_delete_contents()
test_delete_contents_for_empty_contentbank()
test_move_contents()
test_move_contents_for_empty_contentbank()
get_contenttypes_with_capability_feature_provider()
test_get_contenttypes_with_capability_feature()
test_get_content_from_id()
test_is_context_allowed()
Class: contentbank_test - X-Ref
Test for extensions manager.setupBeforeClass() X-Ref |
Setup to ensure that fixtures are loaded. |
get_extension_provider() X-Ref |
Data provider for test_get_extension_supporter. return: array |
test_get_extension(string $filename, string $expected) X-Ref |
Tests for get_extension() function. param: string $filename The filename given param: string $expected The extension of the file |
get_extension_supporters_provider() X-Ref |
Data provider for test_load_context_supported_extensions. return: array |
test_get_extension_supporter_for_admins(array $supporters, string $extension, string $expected) X-Ref |
Tests for get_extension_supporter() function with admin permissions. param: array $supporters The content type plugin supporters for each extension param: string $extension The extension of the file given param: string $expected The supporter contenttype of the file |
test_get_extension_supporter_for_users(array $supporters, string $extension, string $expected) X-Ref |
Tests for get_extension_supporter() function with user default permissions. param: array $supporters The content type plugin supporters for each extension param: string $extension The extension of the file given param: string $expected The supporter contenttype of the file |
test_get_extension_supporter_for_teachers(array $supporters, string $extension, string $expected) X-Ref |
Tests for get_extension_supporter() function with teacher defaul permissions. param: array $supporters The content type plugin supporters for each extension param: string $extension The extension of the file given param: string $expected The supporter contenttype of the file |
test_get_extension_supporter(array $supporters, string $extension, string $expected) X-Ref |
Tests for get_extension_supporter() function. param: array $supporters The content type plugin supporters for each extension param: string $extension The extension of the file given param: string $expected The supporter contenttype of the file |
test_search_contents(?string $search, string $where, int $expectedresult, array $contexts = [],array $contenttypes = null) X-Ref |
Test the behaviour of search_contents(). param: string $search String to search. param: string $where Context where to search. param: int $expectedresult Expected result. param: array $contexts List of contexts where to create content. |
search_contents_provider() X-Ref |
Data provider for test_search_contents(). return: array |
test_create_content_from_file() X-Ref |
Test create_content_from_file function. |
test_delete_contents() X-Ref |
Test the behaviour of delete_contents(). |
test_delete_contents_for_empty_contentbank() X-Ref |
Test the behaviour of delete_contents() for empty content bank. |
test_move_contents() X-Ref |
Test the behaviour of move_contents(). |
test_move_contents_for_empty_contentbank() X-Ref |
Test the behaviour of move_contents() for empty content bank. |
get_contenttypes_with_capability_feature_provider() X-Ref |
Data provider for get_contenttypes_with_capability_feature. return: array |
test_get_contenttypes_with_capability_feature(array $contenttypesenabled, array $contenttypescanfeature) X-Ref |
Tests for get_contenttypes_with_capability_feature() function. param: array $contenttypesenabled Content types enabled. param: array $contenttypescanfeature Content types the user has the permission to use the feature. |
test_get_content_from_id() X-Ref |
Test the behaviour of get_content_from_id() |
test_is_context_allowed() X-Ref |
Test the behaviour of is_context_allowed(). |