Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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

Sent message global search unit tests.

Copyright: 2016 Devang Gaur
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 380 lines (14 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: message_sent_search_testcase  - X-Ref

Provides the unit tests for sent message global search.

setUp()   X-Ref
Setting up the test environment

return: void

test_message_sent_indexing()   X-Ref
Indexing messages contents.

return: void

test_message_sent_indexing_contexts()   X-Ref
Indexing messages, with restricted contexts.


recordset_to_subjects(moodle_recordset $rs)   X-Ref
Utility function to convert recordset to array of message subjects for testing.

param: moodle_recordset $rs Recordset to convert (and close)
return: array Array of IDs from records indexed by number (0, 1, 2, ...)

test_message_sent_document()   X-Ref
Document contents.

return: void

test_message_sent_access()   X-Ref
Document accesses.

return: void

test_message_sent_deleted_user()   X-Ref
Test sent deleted user.
Tests the case where a sent message for a deleted user
is attempted to be added to the index.

return: void

test_get_doc_icon()   X-Ref
Test document icon.


test_get_category_names()   X-Ref
Test assigned search categories.