Differences Between: [Versions 311 and 402] [Versions 311 and 403]
Events tests.
Copyright: | 2014 Mark Nelson <markn@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 577 lines (23 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
events_test:: (18 methods):
setUp()
test_message_contact_added()
test_message_contact_removed()
test_message_user_blocked()
test_message_user_unblocked()
test_message_sent()
test_mesage_sent_without_other_courseid()
test_mesage_sent_via_create_from_ids()
test_group_message_sent()
test_group_message_sent_without_other_courseid()
test_group_message_sent_without_other_conversationid()
test_group_message_sent_via_create_from_ids()
test_message_viewed()
test_message_deleted()
test_message_deleted_whole_conversation()
test_notification_sent()
test_notification_sent_with_null_course()
test_notification_viewed()
Class: events_test - X-Ref
Class containing the tests for message related events.setUp() X-Ref |
Test set up. This is executed before running any test in this file. |
test_message_contact_added() X-Ref |
Test the message contact added event. |
test_message_contact_removed() X-Ref |
Test the message contact removed event. |
test_message_user_blocked() X-Ref |
Test the message user blocked event. |
test_message_user_unblocked() X-Ref |
Test the message user unblocked event. |
test_message_sent() X-Ref |
Test the message sent event. We can not use the message_send() function in the unit test to check that the event was fired as there is a conditional check to ensure a fake message is sent during unit tests when calling that particular function. |
test_mesage_sent_without_other_courseid() X-Ref |
No description |
test_mesage_sent_via_create_from_ids() X-Ref |
No description |
test_group_message_sent() X-Ref |
Test the group message sent event. We can't test events in any testing of the message_send() function as there is a conditional PHPUNIT check in message_send, resulting in fake messages being generated and captured under test. As a result, none of the events code, nor message processor code is called during testing. |
test_group_message_sent_without_other_courseid() X-Ref |
Test the group message sent event when created without a courseid. |
test_group_message_sent_without_other_conversationid() X-Ref |
Test the group message sent event when created without a conversationid. |
test_group_message_sent_via_create_from_ids() X-Ref |
Test the group message sent event using the create_from_ids() method. |
test_message_viewed() X-Ref |
Test the message viewed event. |
test_message_deleted() X-Ref |
Test the message deleted event. |
test_message_deleted_whole_conversation() X-Ref |
Test the message deleted event is fired when deleting a conversation. |
test_notification_sent() X-Ref |
Test the notification sent event. |
test_notification_sent_with_null_course() X-Ref |
Test the notification sent event when null passed as course. |
test_notification_viewed() X-Ref |
Test the notification viewed event. |