[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/cache/tests/cases/ -> lmbCachePersisterKeyDecoratorTest.class.php (source)

   1  <?php
   2  /*
   3   * Limb PHP Framework
   4   *
   5   * @link http://limb-project.com 
   6   * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
   7   * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
   8   */
   9  lmb_require('limb/cache/src/lmbCachePersisterKeyDecorator.class.php');
  10  lmb_require(dirname(__FILE__) . '/lmbCacheTestBase.class.php');
  11  
  12  class CacheKeyFooClass{}
  13  class CacheableFooClass{}
  14  
  15  class lmbCachePersisterKeyDecoratorTest extends lmbCacheTestBase
  16  {
  17    function _createPersisterImp()
  18    {
  19      return new lmbCachePersisterKeyDecorator(new lmbCacheMemoryPersister());
  20    }
  21  
  22    function testGetArrayKeyFalse()
  23    {
  24      $this->_testGetFalse(array(1));
  25    }
  26  
  27    function testGetArrayKeyTrue()
  28    {
  29      $this->_testGetTrue(array(1));
  30    }
  31  
  32    function testGetObjectKeyFalse()
  33    {
  34      $this->_testGetFalse(new CacheKeyFooClass());
  35    }
  36  
  37    function testGetObjectKeyTrue()
  38    {
  39      $this->_testGetTrue(new CacheKeyFooClass());
  40    }
  41  
  42    function testPutToCacheUsingArrayKey()
  43    {
  44      $this->_testPutToCache(array(1));
  45    }
  46  
  47    function testPutToCacheUsingObjectKey()
  48    {
  49      $this->_testPutToCache(new CacheKeyFooClass());
  50    }
  51  
  52    function testPutToCacheWithGroupUsingArrayKey()
  53    {
  54      $this->_testPutToCacheWithGroup(array(1));
  55    }
  56  
  57    function testPutToCacheWithGroupUsingObjectKey()
  58    {
  59      $this->_testPutToCacheWithGroup(new CacheKeyFooClass());
  60    }
  61  
  62    function testFlushValueWithArrayKey()
  63    {
  64      $this->_testFlushValue(array(1), array(2));
  65    }
  66  
  67    function testFlushValueWithObjectKey()
  68    {
  69      $key1 = new CacheKeyFooClass();
  70      $key2 = new CacheKeyFooClass();
  71      $key2->im_different = 1;
  72  
  73      $this->_testFlushValue($key1, $key2);
  74    }
  75  }
  76  
  77  ?>


Generated: Sat Nov 22 03:48:54 2008 Cross-referenced by PHPXref 0.7