From 2300b3e6e4670b6b7e8c1ec9f40abc0d3e99a58a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 11 Oct 2008 16:14:42 +0200 Subject: some changes for the recent FS#1419 and FS#1375 fixes very simple unit test added. Still needs *real world* testing! darcs-hash:20081011141442-7ad00-13378a7a14f81b0799102f0d53d6db8e1078b3e0.gz --- _test/cases/inc/mail_send.php | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 _test/cases/inc/mail_send.php (limited to '_test') diff --git a/_test/cases/inc/mail_send.php b/_test/cases/inc/mail_send.php new file mode 100644 index 000000000..5c2b0e896 --- /dev/null +++ b/_test/cases/inc/mail_send.php @@ -0,0 +1,49 @@ +', + 'dokuwiki1@spam.la, dokuwiki2@spam.la', + 'Test User 1 , Test User 2 ' + ); + + + $run = 0; + foreach($addr as $ad){ + $run++; + $data = array( + 'to' => $ad, + 'subject' => 'mailtest 1-'.$run, + 'body' => "Mailtest run 1-$run using to: $ad from:", + ); + $this->assertTrue((bool) _mail_send_action($data)); + + $data = array( + 'to' => $ad, + 'from' => 'dokuwiki1@spam.la', + 'subject' => 'mailtest 2-'.$run, + 'body' => "Mailtest run 2-$run using to: $ad from: dokuwiki1@spam.la", + ); + $this->assertTrue((bool) _mail_send_action($data)); + + $data = array( + 'to' => $ad, + 'from' => '"Foo Bar" ', + 'subject' => 'mailtest 3-'.$run, + 'body' => "Mailtest run 3-$run using to: $ad from: \"Foo Bar\" ", + ); + $this->assertTrue((bool) _mail_send_action($data)); + } + } + +} +//Setup VIM: ex: et ts=4 enc=utf-8 : -- cgit v1.2.3