Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

(no description)

File Size: 441 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: engine_test  - X-Ref

Simple search engine base unit tests.

setUp()   X-Ref
Initial stuff.

return: void

tearDown()   X-Ref
tearDown

return: void

test_index()   X-Ref
Test indexing process.

return: void

test_search()   X-Ref
Test search filters.

return: void

test_delete()   X-Ref
Test delete function

return: void

test_alloweduserid()   X-Ref
Test user is allowed.

return: void

test_delete_by_id()   X-Ref
No description

test_deleted_contexts_and_courses()   X-Ref
Tries out deleting data for a context or a course.


assert_raw_index_contents(string $searchword, array $expected)   X-Ref
Check the contents of the index.

param: string $searchword Word to match within the content field
param: string[] $expected Array of expected result titles, in alphabetical order

add_mock_search_area()   X-Ref
Adds a mock search area to the search system.


update_index()   X-Ref
Updates mssql fulltext index if necessary.

return: bool

requires_manual_index_update()   X-Ref
Mssql with fulltext support requires manual updates.

return: bool