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); }
/** * Get the user's messages. * * @return string */ public function get_messages_action() { return json_encode(array('html' => \theme_snap\local::messages())); }