diff options
author | Anika Henke <anika@selfthinker.org> | 2014-01-26 17:38:22 +0000 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2014-01-26 17:38:22 +0000 |
commit | 8fe276f7d4bf70c4a798e1c5e7bb3da72a33877d (patch) | |
tree | 1e3ce9edacc852741af07c070176bd04fb61c4b4 /_test/tests/inc/mailer.test.php | |
parent | c5393ecb1aa570830d21e9dc95b4c21cd9aa9c01 (diff) | |
parent | ca605ff6763b98b580278988791dc5e57fc05a74 (diff) | |
download | rpg-8fe276f7d4bf70c4a798e1c5e7bb3da72a33877d.tar.gz rpg-8fe276f7d4bf70c4a798e1c5e7bb3da72a33877d.tar.bz2 |
Merge remote-tracking branch 'origin/master' into video-audio
Diffstat (limited to '_test/tests/inc/mailer.test.php')
-rw-r--r-- | _test/tests/inc/mailer.test.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/_test/tests/inc/mailer.test.php b/_test/tests/inc/mailer.test.php index bac0c39ba..4541d9906 100644 --- a/_test/tests/inc/mailer.test.php +++ b/_test/tests/inc/mailer.test.php @@ -154,7 +154,19 @@ class mailer_test extends DokuWikiTest { $headers['Cc'] = ''; $header = $mail->prepareHeaders(); $this->assertEquals(0, preg_match('/(^|\n)Bcc: (\n|$)/', $header), 'Bcc found in headers.'); - $this->assertEquals(0, preg_match('/(^|\n)Cc: (\n|$)/', $header), 'Bcc found in headers.'); + $this->assertEquals(0, preg_match('/(^|\n)Cc: (\n|$)/', $header), 'Cc found in headers.'); + } + + function test_nullTOorCCorBCC() { + $mail = new TestMailer(); + $headers = &$mail->propRef('headers'); + $headers['Bcc'] = NULL; + $headers['Cc'] = NULL; + $headers['To'] = NULL; + $header = $mail->prepareHeaders(); + $this->assertEquals(0, preg_match('/(^|\n)Bcc: (\n|$)/', $header), 'Bcc found in headers.'); + $this->assertEquals(0, preg_match('/(^|\n)Cc: (\n|$)/', $header), 'Cc found in headers.'); + $this->assertEquals(0, preg_match('/(^|\n)To: (\n|$)/', $header), 'To found in headers.'); } /** |