Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge branch 'MDL-60997-34' of git://github.com/junpataleta/moodle in…
- Loading branch information
Showing
with
6 additions
and
0 deletions.
-
+4
−0
lib/classes/message/message.php
-
+2
−0
lib/tests/message_test.php
|
@@ -101,6 +101,9 @@ class message { |
|
|
/** @var string An email address which can be used to send an reply. */ |
|
|
private $replyto; |
|
|
|
|
|
/** @var string A name which can be used with replyto. */ |
|
|
private $replytoname; |
|
|
|
|
|
/** @var int Used internally to store the id of the row representing this message in DB. */ |
|
|
private $savedmessageid; |
|
|
|
|
@@ -130,6 +133,7 @@ class message { |
|
|
'contexturl', |
|
|
'contexturlname', |
|
|
'replyto', |
|
|
'replytoname', |
|
|
'savedmessageid', |
|
|
'attachment', |
|
|
'attachname', |
|
|
|
@@ -62,6 +62,7 @@ public function test_get_eventobject_for_processor() { |
|
|
$message->contexturl = 'http://GalaxyFarFarAway.com'; |
|
|
$message->contexturlname = 'Context name'; |
|
|
$message->replyto = "random@example.com"; |
|
|
$message->replytoname = fullname($USER); |
|
|
$message->attachname = 'attachment'; |
|
|
$content = array('*' => array('header' => ' test ', 'footer' => ' test ')); // Extra content for all types of messages. |
|
|
$message->set_additional_content('test', $content); |
|
@@ -96,6 +97,7 @@ public function test_get_eventobject_for_processor() { |
|
|
$this->assertSame($message->contexturl, $stdclass->contexturl); |
|
|
$this->assertSame($message->contexturlname, $stdclass->contexturlname); |
|
|
$this->assertSame($message->replyto, $stdclass->replyto); |
|
|
$this->assertSame($message->replytoname, $stdclass->replytoname); |
|
|
$this->assertSame($message->attachname, $stdclass->attachname); |
|
|
|
|
|
// Extra content for fullmessage only. |
|
|