From d3abad28764286cb8a58e5c74173d3fd671c5ac0 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 09 Feb 2014 11:39:27 -0500
Subject: [PATCH] Add more tests for framework classes

---
 tests/Framework/Contacts.php    |   20 ++++++++++
 tests/phpunit.xml               |    5 ++
 tests/Framework/ImapCache.php   |   20 ++++++++++
 tests/Framework/CacheShared.php |   20 ++++++++++
 tests/Framework/LdapGeneric.php |   20 ++++++++++
 tests/Framework/DB.php          |   20 ++++++++++
 6 files changed, 105 insertions(+), 0 deletions(-)

diff --git a/tests/Framework/CacheShared.php b/tests/Framework/CacheShared.php
new file mode 100644
index 0000000..9ddcafc
--- /dev/null
+++ b/tests/Framework/CacheShared.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * Test class to test rcube_cache_shared class
+ *
+ * @package Tests
+ */
+class Framework_CacheShared extends PHPUnit_Framework_TestCase
+{
+
+    /**
+     * Class constructor
+     */
+    function test_class()
+    {
+        $object = new rcube_cache_shared('db');
+
+        $this->assertInstanceOf('rcube_cache_shared', $object, "Class constructor");
+    }
+}
diff --git a/tests/Framework/Contacts.php b/tests/Framework/Contacts.php
new file mode 100644
index 0000000..0167ea3
--- /dev/null
+++ b/tests/Framework/Contacts.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * Test class to test rcube_contacts class
+ *
+ * @package Tests
+ */
+class Framework_Contacts extends PHPUnit_Framework_TestCase
+{
+
+    /**
+     * Class constructor
+     */
+    function test_class()
+    {
+        $object = new rcube_contacts(null, null);
+
+        $this->assertInstanceOf('rcube_contacts', $object, "Class constructor");
+    }
+}
diff --git a/tests/Framework/DB.php b/tests/Framework/DB.php
new file mode 100644
index 0000000..b7a0638
--- /dev/null
+++ b/tests/Framework/DB.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * Test class to test rcube_db class
+ *
+ * @package Tests
+ */
+class Framework_DB extends PHPUnit_Framework_TestCase
+{
+
+    /**
+     * Class constructor
+     */
+    function test_class()
+    {
+        $object = new rcube_db('test');
+
+        $this->assertInstanceOf('rcube_db', $object, "Class constructor");
+    }
+}
diff --git a/tests/Framework/ImapCache.php b/tests/Framework/ImapCache.php
new file mode 100644
index 0000000..83612c5
--- /dev/null
+++ b/tests/Framework/ImapCache.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * Test class to test rcube_imap_cache class
+ *
+ * @package Tests
+ */
+class Framework_ImapCache extends PHPUnit_Framework_TestCase
+{
+
+    /**
+     * Class constructor
+     */
+    function test_class()
+    {
+        $object = new rcube_imap_cache(null, null, null, null);
+
+        $this->assertInstanceOf('rcube_imap_cache', $object, "Class constructor");
+    }
+}
diff --git a/tests/Framework/LdapGeneric.php b/tests/Framework/LdapGeneric.php
new file mode 100644
index 0000000..8cb1a2c
--- /dev/null
+++ b/tests/Framework/LdapGeneric.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * Test class to test rcube_ldap_generic class
+ *
+ * @package Tests
+ */
+class Framework_LdapGeneric extends PHPUnit_Framework_TestCase
+{
+
+    /**
+     * Class constructor
+     */
+    function test_class()
+    {
+        $object = new rcube_ldap_generic(array());
+
+        $this->assertInstanceOf('rcube_ldap_generic', $object, "Class constructor");
+    }
+}
diff --git a/tests/phpunit.xml b/tests/phpunit.xml
index a5942c4..8021933 100644
--- a/tests/phpunit.xml
+++ b/tests/phpunit.xml
@@ -7,15 +7,20 @@
             <file>Framework/Bootstrap.php</file>
             <file>Framework/Browser.php</file>
             <file>Framework/Cache.php</file>
+            <file>Framework/CacheShared.php</file>
             <file>Framework/Charset.php</file>
+            <file>Framework/Contacts.php</file>
             <file>Framework/ContentFilter.php</file>
             <file>Framework/Csv2vcard.php</file>
+            <file>Framework/DB.php</file>
             <file>Framework/Enriched.php</file>
             <file>Framework/Html.php</file>
             <file>Framework/Html2text.php</file>
             <file>Framework/Imap.php</file>
+            <file>Framework/ImapCache.php</file>
             <file>Framework/ImapGeneric.php</file>
             <file>Framework/Image.php</file>
+            <file>Framework/LdapGeneric.php</file>
             <file>Framework/MessageHeader.php</file>
             <file>Framework/MessagePart.php</file>
             <file>Framework/Mime.php</file>

--
Gitblit v1.9.1