[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/message/tests/ -> externallib_test.php (summary)

External message functions unit tests

Copyright: 2012 Jerome Mouneyrac
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 581 lines (26 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_message_externallib_testcase:: (10 methods):
  setUp()
  send_message()
  test_send_instant_messages()
  test_create_contacts()
  test_delete_contacts()
  test_block_contacts()
  test_unblock_contacts()
  test_get_contacts()
  test_search_contacts()
  test_get_messages()


Class: core_message_externallib_testcase  - X-Ref

setUp()   X-Ref
Tests set up


send_message($userfrom, $userto, $message = 'Hello world!')   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.

test_send_instant_messages()   X-Ref
Test send_instant_messages


test_create_contacts()   X-Ref
Test create_contacts.


test_delete_contacts()   X-Ref
Test delete_contacts.


test_block_contacts()   X-Ref
Test block_contacts.


test_unblock_contacts()   X-Ref
Test unblock_contacts.


test_get_contacts()   X-Ref
Test get_contacts.


test_search_contacts()   X-Ref
Test search_contacts.


test_get_messages()   X-Ref
Test get_messages.




Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1