Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Protected Attributes | List of all members
phpunit_message_sink Class Reference

Public Member Functions

 add_message ($message)
 To be called from phpunit_util only! More...
 
 clear ()
 Removes all previously stored messages.
 
 close ()
 Stop message redirection. More...
 
 count ()
 Return number of messages redirected to this sink. More...
 
 get_messages ()
 Returns all redirected messages. More...
 

Protected Attributes

array $messages = array()
 of records from messages table
 

Member Function Documentation

◆ add_message()

phpunit_message_sink::add_message (   $message)

To be called from phpunit_util only!

Parameters
stdClass$messagerecord from messages table

◆ close()

phpunit_message_sink::close ( )

Stop message redirection.

Use if you do not want message redirected any more.

◆ count()

phpunit_message_sink::count ( )

Return number of messages redirected to this sink.

Return values
int

◆ get_messages()

phpunit_message_sink::get_messages ( )

Returns all redirected messages.

The instances are records from the messages table. The array indexes are numbered from 0 and the order is matching the creation of events.

Return values
array

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