summaryrefslogtreecommitdiff
path: root/modules/gallery/tests
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-08-31 20:39:25 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-08-31 20:45:09 -0700
commite09c6dbd5e81c6c56e9c4f386ff431c0cfe9c2b0 (patch)
treecd54e690d98bd4d36b890fb0eaa5b799436cdbb4 /modules/gallery/tests
parent438cea231d93c81adaccb0460327cc703a43da71 (diff)
Patch for ticket #1216. Move the values that were in the sendmail config file and store them as gallery module variables. Requires a version number bump to 37.
Diffstat (limited to 'modules/gallery/tests')
-rw-r--r--modules/gallery/tests/Sendmail_Test.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/modules/gallery/tests/Sendmail_Test.php b/modules/gallery/tests/Sendmail_Test.php
index b9406047..92974e5c 100644
--- a/modules/gallery/tests/Sendmail_Test.php
+++ b/modules/gallery/tests/Sendmail_Test.php
@@ -23,9 +23,10 @@ class Sendmail_Test extends Gallery_Unit_Test_Case {
}
public function sendmail_test() {
+ $domain = Input::instance()->server("HTTP_HOST");
$expected = "To: receiver@someemail.com\r\n" .
"From: from@gallery3.com\n" .
- "Reply-To: public@gallery3.com\r\n" .
+ "Reply-To: public@$domain\r\n" .
"Subject: Test Email Unit test\r\n\r\n" .
"The mail message body";
$result = Sendmail_For_Test::factory()
@@ -45,8 +46,9 @@ class Sendmail_Test extends Gallery_Unit_Test_Case {
}
public function sendmail_reply_to_test() {
+ $domain = Input::instance()->server("HTTP_HOST");
$expected = "To: receiver@someemail.com\r\n" .
- "From: from@gallery3.com\n" .
+ "From: admin@$domain\n" .
"Reply-To: reply-to@gallery3.com\r\n" .
"Subject: Test Email Unit test\r\n\r\n" .
"The mail message body";
@@ -61,9 +63,10 @@ class Sendmail_Test extends Gallery_Unit_Test_Case {
}
public function sendmail_html_message_test() {
+ $domain = Input::instance()->server("HTTP_HOST");
$expected = "To: receiver@someemail.com\r\n" .
- "From: from@gallery3.com\n" .
- "Reply-To: public@gallery3.com\n" .
+ "From: admin@$domain\n" .
+ "Reply-To: public@$domain\n" .
"MIME-Version: 1.0\n" .
"Content-Type: text/html; charset=UTF-8\r\n" .
"Subject: Test Email Unit test\r\n\r\n" .
@@ -80,9 +83,10 @@ class Sendmail_Test extends Gallery_Unit_Test_Case {
}
public function sendmail_wrapped_message_test() {
+ $domain = Input::instance()->server("HTTP_HOST");
$expected = "To: receiver@someemail.com\r\n" .
- "From: from@gallery3.com\n" .
- "Reply-To: public@gallery3.com\r\n" .
+ "From: admin@$domain\n" .
+ "Reply-To: public@$domain\r\n" .
"Subject: Test Email Unit test\r\n\r\n" .
"This is a long message that needs to go\n" .
"over forty characters If we get lucky we\n" .