Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

(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