Commit e61a9638 authored by Mark Nielsen's avatar Mark Nielsen Committed by Rajesh Taneja
Browse files

MDL-52060 phpunit: Improve get_message_processors reset

parent d494306d
......@@ -207,7 +207,7 @@ class phpunit_util extends testing_util {
reset_text_filters_cache(true);
events_get_handlers('reset');
core_text::reset_caches();
get_message_processors(false, true);
get_message_processors(false, true, true);
filter_manager::reset_caches();
core_filetypes::reset_caches();
......
......@@ -2571,14 +2571,19 @@ function message_mark_message_read($message, $timeread, $messageworkingempty=fal
*
* @param bool $ready only return ready-to-use processors
* @param bool $reset Reset list of message processors (used in unit tests)
* @param bool $resetonly Just reset, then exit
* @return mixed $processors array of objects containing information on message processors
*/
function get_message_processors($ready = false, $reset = false) {
function get_message_processors($ready = false, $reset = false, $resetonly = false) {
global $DB, $CFG;
static $processors;
if ($reset) {
$processors = array();
if ($resetonly) {
return $processors;
}
}
if (empty($processors)) {
......
This files describes API changes in /message/ messaging system,
information provided here is intended especially for developers.
=== 3.1 ===
* get_message_processors accepts an addition parameter for testing, which will just reset processor and exit.
=== 2.9 ===
* Renderer method \core_message_renderer::manage_messagingoptions now accepts a user id parameter as well.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment