summaryrefslogtreecommitdiff
path: root/test/KolabAdmin/Unit/BaseTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/KolabAdmin/Unit/BaseTest.php')
-rw-r--r--test/KolabAdmin/Unit/BaseTest.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/test/KolabAdmin/Unit/BaseTest.php b/test/KolabAdmin/Unit/BaseTest.php
index 4b36d55..9ee2d41 100644
--- a/test/KolabAdmin/Unit/BaseTest.php
+++ b/test/KolabAdmin/Unit/BaseTest.php
@@ -32,7 +32,21 @@ require_once dirname(__FILE__) . '/../../../lib/KolabAdmin/Ldap.php';
*/
class KolabAdmin_Unit_BaseTest extends PHPUnit_Framework_TestCase
{
- public function testSomething()
+ public function setUp()
{
+ $_SESSION = array();
+ require '/kolab/etc/kolab/session_vars.php';
}
-} \ No newline at end of file
+
+ public function testCountmailReturnsZeroOnNonExistantMail()
+ {
+ $ldap = new KolabLdap();
+ $this->assertEquals(
+ 0,
+ $ldap->countMail($_SESSION['base_dn'], 'certainly@does@not@exist')
+ );
+ }
+}
+
+/** short circuit the debug function. */
+function debug() {}; \ No newline at end of file