Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403]

(no description)

File Size: 438 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