summaryrefslogtreecommitdiff
path: root/modules/gallery/tests
diff options
context:
space:
mode:
authormamouneyya <mamoun.diraneyya@gmail.com>2010-09-02 22:32:46 +0300
committermamouneyya <mamoun.diraneyya@gmail.com>2010-09-02 22:32:46 +0300
commit9572c664d2bfff0877d4f2062eb0ef6665a109cf (patch)
tree89c8e2868c1490a0bc578ce4a69c0ed7fae8b5bf /modules/gallery/tests
parenta0033ce75968b3c134c0e439046f135b1e646550 (diff)
parent511826a33cbbf03bf1e3cb151f1a181b8e6723e8 (diff)
Merge remote branch 'gallery3/master'
Diffstat (limited to 'modules/gallery/tests')
-rw-r--r--modules/gallery/tests/Sendmail_Test.php22
1 files changed, 9 insertions, 13 deletions
diff --git a/modules/gallery/tests/Sendmail_Test.php b/modules/gallery/tests/Sendmail_Test.php
index b9406047..aee6abf5 100644
--- a/modules/gallery/tests/Sendmail_Test.php
+++ b/modules/gallery/tests/Sendmail_Test.php
@@ -19,23 +19,18 @@
*/
class Sendmail_Test extends Gallery_Unit_Test_Case {
public function setup() {
- Kohana_Config::instance()->set("sendmail.from", "from@gallery3.com");
+ module::set_var("gallery", "email_from", "from@gallery3.com");
+ module::set_var("gallery", "email_reply_to", "reply_to@gallery3.com");
}
- public function sendmail_test() {
+ public function sendmail_basic_test() {
$expected = "To: receiver@someemail.com\r\n" .
"From: from@gallery3.com\n" .
- "Reply-To: public@gallery3.com\r\n" .
+ "Reply-To: reply_to@gallery3.com\r\n" .
"Subject: Test Email Unit test\r\n\r\n" .
"The mail message body";
$result = Sendmail_For_Test::factory()
->to("receiver@someemail.com")
- /*
- * @todo figure out why this test fails so badly, when the following
- * line is not supplied. It doesn't seem to be set by setup method
- * as you would expect.
- */
- ->from("from@gallery3.com")
->subject("Test Email Unit test")
->message("The mail message body")
->send()
@@ -47,13 +42,13 @@ class Sendmail_Test extends Gallery_Unit_Test_Case {
public function sendmail_reply_to_test() {
$expected = "To: receiver@someemail.com\r\n" .
"From: from@gallery3.com\n" .
- "Reply-To: reply-to@gallery3.com\r\n" .
+ "Reply-To: reply_to@gallery3.com\r\n" .
"Subject: Test Email Unit test\r\n\r\n" .
"The mail message body";
$result = Sendmail_For_Test::factory()
->to("receiver@someemail.com")
->subject("Test Email Unit test")
- ->reply_to("reply-to@gallery3.com")
+ ->reply_to("reply_to@gallery3.com")
->message("The mail message body")
->send()
->send_text;
@@ -63,7 +58,7 @@ class Sendmail_Test extends Gallery_Unit_Test_Case {
public function sendmail_html_message_test() {
$expected = "To: receiver@someemail.com\r\n" .
"From: from@gallery3.com\n" .
- "Reply-To: public@gallery3.com\n" .
+ "Reply-To: reply_to@gallery3.com\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 +75,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" .
+ "Reply-To: reply_to@gallery3.com\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" .