diff options
author | Guy Brand <gb@unistra.fr> | 2013-12-08 18:04:50 +0100 |
---|---|---|
committer | Guy Brand <gb@unistra.fr> | 2013-12-08 18:04:50 +0100 |
commit | fb23e32bcb0a62b9d404f89139601341f926c1d9 (patch) | |
tree | 4d30240af3098ab3bf8b6862b412373f988ab2ea /_test/tests/inc/mailer.test.php | |
parent | 2877053aad7cf3e245eaedfe042ccc4ebfcf273b (diff) | |
parent | 8c4759c9d38a21eb352498a8035944ee019e7738 (diff) | |
download | rpg-fb23e32bcb0a62b9d404f89139601341f926c1d9.tar.gz rpg-fb23e32bcb0a62b9d404f89139601341f926c1d9.tar.bz2 |
Merge branch 'master' into stable
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.'); } /** |