| [ Index ] |
PHP Cross Reference of Moodle 310 |
[Source view] [Print] [Project Stats]
Search manager unit tests.
| Copyright: | 2015 David Monllao {@link http://www.davidmonllao.com} |
| License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
| File Size: | 1550 lines (73 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 2 files search/tests/fixtures/mock_search_area.php search/tests/fixtures/testable_core_search.php |
search_manager_testcase:: (32 methods):
setUp()
tearDown()
test_search_enabled()
test_course_search_url()
test_search_areas()
test_search_config()
test_get_last_indexing_duration()
test_partial_indexing()
test_index_progress()
test_future_documents()
test_context_indexing()
test_search_user_accesses()
test_search_user_accesses_blocks()
test_search_users_accesses_limit_non_enrolled_course()
test_search_user_accesses_allavailable()
test_search_user_accesses_groups()
test_is_search_area()
test_request_index()
test_process_index_requests()
test_get_search_area_categories()
test_is_search_area_categories_enabled()
test_should_hide_all_results_category()
test_get_default_area_category_name()
test_get_search_area_category_by_name()
test_include_all_courses_enabled()
test_build_limitcourseids()
parse_search_area_id_data_provider()
test_parse_search_area_id()
test_parse_invalid_search_area_id()
test_cleaning_up_existing_search_area()
test_clean_up_non_existing_search_area()
test_context_deletion()
Class: search_manager_testcase - X-Ref
Unit tests for search manager.| setUp() X-Ref |
| Courses area id. |
| tearDown() X-Ref |
| No description |
| test_search_enabled() X-Ref |
| No description |
| test_course_search_url() X-Ref |
| No description |
| test_search_areas() X-Ref |
| No description |
| test_search_config() X-Ref |
| No description |
| test_get_last_indexing_duration() X-Ref |
| Tests the get_last_indexing_duration method in the base area class. |
| test_partial_indexing() X-Ref |
| Tests that partial indexing works correctly. |
| test_index_progress() X-Ref |
| Tests the progress display while indexing. This tests the different logic about displaying progress for slow/fast and complete/incomplete processing. |
| test_future_documents() X-Ref |
| Tests that documents with modified time in the future are NOT indexed (as this would cause a problem by preventing it from indexing other documents modified between now and the future date). |
| test_context_indexing() X-Ref |
| Tests that indexing a specified context works correctly. |
| test_search_user_accesses() X-Ref |
| Adding this test here as get_areas_user_accesses process is the same, results just depend on the context level. return: void |
| test_search_user_accesses_blocks() X-Ref |
| Tests the block support in get_search_user_accesses. return: void |
| test_search_users_accesses_limit_non_enrolled_course() X-Ref |
| Tests retrieval of users search areas when limiting to a course the user is not enrolled in |
| test_search_user_accesses_allavailable() X-Ref |
| Test get_areas_user_accesses with regard to the 'all available courses' config option. return: void |
| test_search_user_accesses_groups() X-Ref |
| Tests group-related aspects of the get_areas_user_accesses function. |
| test_is_search_area() X-Ref |
| test_is_search_area return: void |
| test_request_index() X-Ref |
| Tests the request_index function used for reindexing certain contexts. This only tests adding things to the request list, it doesn't test that they are actually indexed by the scheduled task. |
| test_process_index_requests() X-Ref |
| Tests the process_index_requests function. |
| test_get_search_area_categories() X-Ref |
| Test search area categories. |
| test_is_search_area_categories_enabled() X-Ref |
| Test that we can find out if search area categories functionality is enabled. |
| test_should_hide_all_results_category() X-Ref |
| Test that we can find out if hiding all results category is enabled. |
| test_get_default_area_category_name() X-Ref |
| Test that we can get default search category name. |
| test_get_search_area_category_by_name() X-Ref |
| Test that we can get correct search area category by its name. |
| test_include_all_courses_enabled() X-Ref |
| Test that we can check that "Include all visible courses" feature is enabled. |
| test_build_limitcourseids() X-Ref |
| Test that we can correctly build a list of courses for a course filter for the search results. |
| parse_search_area_id_data_provider() X-Ref |
| Test data for test_parse_areaid test fucntion. return: array |
| test_parse_search_area_id($areaid, $expected) X-Ref |
| Test that manager class can parse area id correctly. param: string $areaid Area id to parse. param: array $expected Expected result of parsing. |
| test_parse_invalid_search_area_id() X-Ref |
| Test that manager class will throw an exception when parsing an invalid area id. |
| test_cleaning_up_existing_search_area() X-Ref |
| Test getting a coding exception when trying to lean up existing search area. |
| test_clean_up_non_existing_search_area() X-Ref |
| Test clean up of non existing search area. |
| test_context_deletion() X-Ref |
| Tests the context_deleted, course_deleting_start, and course_deleting_finish methods. |
| Generated: Wed Jan 22 11:59:49 2025 | Cross-referenced by PHPXref 0.7.1 |