コード例 #1
0
 public function test_no_messages()
 {
     global $USER;
     $actual = local::get_user_messages($USER->id);
     $expected = array();
     $this->assertSame($actual, $expected);
     $actual = local::messages();
     $expected = '<p>You have no messages.</p>';
     $this->assertSame($actual, $expected);
 }
コード例 #2
0
 /**
  * Get the user's messages.
  *
  * @return string
  */
 public function get_messages_action()
 {
     return json_encode(array('html' => \theme_snap\local::messages()));
 }