summaryrefslogtreecommitdiff
path: root/_test/tests/inc/mailer.test.php
diff options
context:
space:
mode:
authorGerrit Uitslag <klapinklapin@gmail.com>2014-02-15 15:10:15 +0100
committerGerrit Uitslag <klapinklapin@gmail.com>2014-02-15 15:10:15 +0100
commit2643fc174cfce2c89b096e1aa28b8433c1bd9088 (patch)
tree4219fa16c1e196fca55429092494051eb899891c /_test/tests/inc/mailer.test.php
parent1da8dc976a4e9184fe550789a77d8e5cb866926f (diff)
parent0ba750c06b51626ccace39f0f6be7062eebb0a40 (diff)
downloadrpg-2643fc174cfce2c89b096e1aa28b8433c1bd9088.tar.gz
rpg-2643fc174cfce2c89b096e1aa28b8433c1bd9088.tar.bz2
Merge remote-tracking branch 'origin/master' into diff_navigation
Diffstat (limited to '_test/tests/inc/mailer.test.php')
-rw-r--r--_test/tests/inc/mailer.test.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/_test/tests/inc/mailer.test.php b/_test/tests/inc/mailer.test.php
index bac0c39ba..50d282864 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.');
}
/**
@@ -179,7 +191,10 @@ class mailer_test extends DokuWikiTest {
// ask message lint if it is okay
$html = new HTTPClient();
$results = $html->post('http://tools.ietf.org/tools/msglint/msglint', array('msg'=>$msg));
- $this->assertTrue($results !== false);
+ if($results === false) {
+ $this->markTestSkipped('no response from validator');
+ return;
+ }
// parse the result lines
$lines = explode("\n", $results);