MDL-48192 tool_monitor: check output buffer and not ignore it.
authorRajesh Taneja <rajesh@moodle.com>
Thu, 13 Nov 2014 08:32:56 +0000 (16:32 +0800)
committerRajesh Taneja <rajesh@moodle.com>
Thu, 27 Nov 2014 09:02:26 +0000 (17:02 +0800)
Check what is thrown in output buffer and
make sure output is expected output.

admin/tool/monitor/tests/eventobservers_test.php

index 73b684f..79356c6 100644 (file)
@@ -404,12 +404,11 @@ class tool_monitor_eventobservers_testcase extends advanced_testcase {
      * Run adhoc tasks.
      */
     protected function run_adhock_tasks() {
-        ob_start();
         while ($task = \core\task\manager::get_next_adhoc_task(time())) {
             $task->execute();
             \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");
     }
 
     /**