MDL-48192 tool_monitor: check output buffer and not ignore it.

Check what is thrown in output buffer and
make sure output is expected output.
This commit is contained in:
Rajesh Taneja 2014-11-13 16:32:56 +08:00
parent ca0e301c7b
commit 2b51813b11

View file

@ -404,12 +404,11 @@ class tool_monitor_eventobservers_testcase extends advanced_testcase {
* Run adhoc tasks. * Run adhoc tasks.
*/ */
protected function run_adhock_tasks() { protected function run_adhock_tasks() {
ob_start();
while ($task = \core\task\manager::get_next_adhoc_task(time())) { while ($task = \core\task\manager::get_next_adhoc_task(time())) {
$task->execute(); $task->execute();
\core\task\manager::adhoc_task_complete($task); \core\task\manager::adhoc_task_complete($task);
} }
ob_clean(); // Suppress mtrace debugging info. $this->expectOutputRegex("/^Sending message to the user with id \d+ for the subscription with id \d+\.\.\..Sent./ms");
} }
/** /**