From 56e830aec68cf5c0f5596b5f3afbf4e6d1e5ab99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Fri, 21 Feb 2014 20:38:03 +0100 Subject: [PATCH] Add new test for mail --- test/mailTest.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/mailTest.php b/test/mailTest.php index e6756dd..54abdc3 100644 --- a/test/mailTest.php +++ b/test/mailTest.php @@ -12,7 +12,7 @@ require_once (dirname(__FILE__) . "/../sendtomail.php"); class MailTest extends PHPUnit_Framework_TestCase { - public function testCheckConfiguration () { + public function testCheckConfigurationOk () { global $config; $this->assertFalse(checkConfiguration ()); @@ -53,4 +53,16 @@ class MailTest extends PHPUnit_Framework_TestCase $this->markTestIncomplete(); } + public function testCheckRequest () { + $this->assertFalse (checkRequest (12, "a@a.com")); + } + + public function testCheckRequestNoData () { + $this->assertStringStartsWith ("No", checkRequest (NULL, "a@a.com")); + } + + public function testCheckRequestNoEmail () { + $this->assertStringStartsWith ("No", checkRequest (12, NULL)); + } + } \ No newline at end of file