Browse Source

Add new test for mail

master
Sébastien Lucas 10 years ago
parent
commit
56e830aec6
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      test/mailTest.php

+ 13
- 1
test/mailTest.php View File

@@ -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));
}
}

Loading…
Cancel
Save