Esempio n. 1
0
 public function test_messages()
 {
     global $SESSION;
     $notify = new mr_html_notify();
     $notify->set_component('local_mr');
     $notify->set_align('right');
     $notify->good('mrframework');
     $notify->bad('mrframework');
     $expected = array(array(get_string('mrframework', 'local_mr'), 'notifysuccess', 'right'), array(get_string('mrframework', 'local_mr'), 'notifyproblem', 'right'));
     $this->assertIdentical($SESSION->messages, $expected);
     $this->assertIdentical($notify->get_messages(), $expected);
     $this->assertTrue(empty($SESSION->messages));
 }