See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]
Test api's in message lib.
Copyright: | 2014 Rajesh Taneja <rajesh@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 421 lines (16 kb) |
Included or required: | 0 times |
Referenced: | 5 times |
Includes or requires: | 0 files |
core_message_messagelib_testcase:: (15 methods):
setUp()
send_fake_message()
test_message_get_blocked_users()
test_message_get_contacts()
test_message_count_unread_messages()
test_message_count_unread_messages_with_read_messages()
test_message_count_unread_messages_with_deleted_messages()
test_message_count_unread_messages_with_sent_messages()
test_message_add_contact()
test_message_remove_contact()
test_message_block_contact()
test_message_unblock_contact()
test_message_search_users()
test_message_get_messages()
test_message_get_messages_only_group_conversations()
Class: core_message_messagelib_testcase - X-Ref
Test api's in message lib.setUp() X-Ref |
Test set up. This is executed before running any test in this file. |
send_fake_message($userfrom, $userto, $message = 'Hello world!', $notification = 0, $time = 0) X-Ref |
Send a fake message. {@link message_send()} does not support transaction, this function will simulate a message sent from a user to another. We should stop using it once {@link message_send()} will support transactions. This is not clean at all, this is just used to add rows to the table. param: stdClass $userfrom user object of the one sending the message. param: stdClass $userto user object of the one receiving the message. param: string $message message to send. param: int $notification if the message is a notification. param: int $time the time the message was sent return: int the id of the message |
test_message_get_blocked_users() X-Ref |
Test message_get_blocked_users throws an exception because has been removed. |
test_message_get_contacts() X-Ref |
Test message_get_contacts throws an exception because has been removed. |
test_message_count_unread_messages() X-Ref |
Test message_count_unread_messages. |
test_message_count_unread_messages_with_read_messages() X-Ref |
Test message_count_unread_messages with read messages. |
test_message_count_unread_messages_with_deleted_messages() X-Ref |
Test message_count_unread_messages with deleted messages. |
test_message_count_unread_messages_with_sent_messages() X-Ref |
Test message_count_unread_messages with sent messages. |
test_message_add_contact() X-Ref |
Test message_add_contact. |
test_message_remove_contact() X-Ref |
Test message_remove_contact. |
test_message_block_contact() X-Ref |
Test message_block_contact. |
test_message_unblock_contact() X-Ref |
Test message_unblock_contact. |
test_message_search_users() X-Ref |
Test message_search_users. |
test_message_get_messages() X-Ref |
Test message_get_messages. |
test_message_get_messages_only_group_conversations() X-Ref |
Test message_get_messages with only group conversations between users. |