See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401]
(no description)
File Size: | 814 lines (34 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 2 files availability/tests/fixtures/mock_info.php availability/tests/fixtures/mock_condition.php |
tree_test:: (18 methods):
setUp()
test_construct_errors()
test_construct_ignore_missing_plugin()
test_construct_just_trees()
test_construct_with_mock_plugin()
test_check_available()
get_available_results()
render_full_information()
test_is_available_for_all()
test_get_full_information()
test_is_empty()
test_get_all_children()
test_update_dependency_id()
test_filter_users()
test_get_json()
test_unique_sql_parameter_behaviour()
test_get_user_list_sql()
mock()
setUp() X-Ref |
No description |
test_construct_errors() X-Ref |
Tests constructing a tree with errors. |
test_construct_ignore_missing_plugin() X-Ref |
Tests constructing a tree with plugin that does not exist (ignored). |
test_construct_just_trees() X-Ref |
Tests constructing a tree with subtrees using all available operators. |
test_construct_with_mock_plugin() X-Ref |
Tests constructing tree using the mock plugin. |
test_check_available() X-Ref |
Tests the check_available and get_result_information functions. |
get_available_results($structure, \core_availability\info $info, $userid) X-Ref |
Shortcut function to check availability and also get information. param: \stdClass $structure Tree structure param: \core_availability\info $info Location info param: int $userid User id |
render_full_information($structure, \core_availability\info $info) X-Ref |
Shortcut function to render the full availability information. param: \stdClass $structure Tree structure param: \core_availability\info $info Location info |
test_is_available_for_all() X-Ref |
Tests the is_available_for_all() function. |
test_get_full_information() X-Ref |
Tests the get_full_information() function. |
test_is_empty() X-Ref |
Tests the is_empty() function. |
test_get_all_children() X-Ref |
Tests the get_all_children() function. |
test_update_dependency_id() X-Ref |
Tests the update_dependency_id() function. |
test_filter_users() X-Ref |
Tests the filter_users function. |
test_get_json() X-Ref |
Tests the get_json methods in tree (which are mainly for use in testing but might be used elsewhere). |
test_unique_sql_parameter_behaviour() X-Ref |
Tests the behaviour of the counter in unique_sql_parameter(). There was a problem with static counters used to implement a sequence of parameter placeholders (MDL-53481). As always with static variables, it is a bit tricky to unit test the behaviour reliably as it depends on the actual tests executed and also their order. To minimise risk of false expected behaviour, this test method should be first one where {@link core_availability\tree::get_user_list_sql()} is used. We also use higher number of condition instances to increase the risk of the counter collision, should there remain a problem. |
test_get_user_list_sql() X-Ref |
Tests get_user_list_sql. |
mock(array $params) X-Ref |
Utility function to build the PHP structure representing a mock condition. param: array $params Mock parameters return: \stdClass Structure object |