Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | List of all members
core_message\tests\helper Class Reference

The helper class providing util methods for testing. More...

Static Public Member Functions

static send_fake_message_to_conversation (\stdClass $userfrom, int $convid, string $message='Hello world!', int $time=null)
 Sends a message to a conversation. More...
 

Detailed Description

The helper class providing util methods for testing.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ send_fake_message_to_conversation()

static core_message\tests\helper::send_fake_message_to_conversation ( \stdClass  $userfrom,
int  $convid,
string  $message = 'Hello world!',
int  $time = null 
)
static

Sends a message to a conversation.

Parameters
stdClass$userfromuser object of the one sending the message.
int$convidid of the conversation in which we'll send the message.
string$messagemessage to send.
int$timethe time the message was sent.
Return values
intthe id of the message which was sent.
Exceptions
dml_exceptionif the conversation doesn't exist.

The documentation for this class was generated from the following file: