Skip to content

Commit

Permalink
Add Hashtable cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Mar 7, 2014
1 parent 1ff5a7b commit e230fce
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
4 changes: 3 additions & 1 deletion framework/Imap_Client/package.xml
Expand Up @@ -230,6 +230,7 @@
<dir name="Cache">
<file name="CacheTest.php" role="test" />
<file name="DbTest.php" role="test" />
<file name="HashtableTest.php" role="test" />
<file name="MongoTest.php" role="test" />
<file name="TestBase.php" role="test" />
</dir> <!-- /test/Horde/Imap/Client/Cache -->
Expand Down Expand Up @@ -417,7 +418,7 @@
<package>
<name>Horde_Test</name>
<channel>pear.horde.org</channel>
<min>2.1.0</min>
<min>2.2.7</min>
<max>3.0.0alpha1</max>
<exclude>3.0.0alpha1</exclude>
</package>
Expand Down Expand Up @@ -545,6 +546,7 @@
<install as="Horde/Imap/Client/Base/MailboxTest.php" name="test/Horde/Imap/Client/Base/MailboxTest.php" />
<install as="Horde/Imap/Client/Cache/CacheTest.php" name="test/Horde/Imap/Client/Cache/CacheTest.php" />
<install as="Horde/Imap/Client/Cache/DbTest.php" name="test/Horde/Imap/Client/Cache/DbTest.php" />
<install as="Horde/Imap/Client/Cache/HashtableTest.php" name="test/Horde/Imap/Client/Cache/HashtableTest.php" />
<install as="Horde/Imap/Client/Cache/MongoTest.php" name="test/Horde/Imap/Client/Cache/MongoTest.php" />
<install as="Horde/Imap/Client/Cache/TestBase.php" name="test/Horde/Imap/Client/Cache/TestBase.php" />
<install as="Horde/Imap/Client/Data/Format/AstringTest.php" name="test/Horde/Imap/Client/Data/Format/AstringTest.php" />
Expand Down
@@ -0,0 +1,42 @@
<?php
/**
* Copyright 2013-2014 Horde LLC (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (LGPL). If you
* did not receive this file, see http://www.horde.org/licenses/lgpl21.
*
* @category Horde
* @copyright 2013-2014 Horde LLC
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Imap_Client
* @subpackage UnitTests
*/

/**
* Tests for the Horde_HashTable cache driver.
*
* @author Michael Slusarz <slusarz@horde.org>
* @category Horde
* @copyright 2013-2014 Horde LLC
* @ignore
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Imap_Client
* @subpackage UnitTests
*/
class Horde_Imap_Client_Cache_HashtableTest
extends Horde_Imap_Client_Cache_TestBase
{
protected function _getBackend()
{
$factory_hashtable = new Horde_Test_Factory_Hashtable();

try {
return new Horde_Imap_Client_Cache_Backend_Hashtable(array(
'hashtable' => $factory_hashtable->create()
));
} catch (Horde_Test_Exception $e) {
$this->markTestSkipped('HashTable not available.');
}
}

}

0 comments on commit e230fce

Please sign in to comment.