Exemple #1
0
 /**
  * Test Cache_Lite wrapper {@link epCacheCachelite}
  * 
  * Prepare Cache_Lite:
  *   Upgrade or install Cache_Lite through PEAR
  *   $ sudo pear install Cache_Lite
  *   $ sudo pear upgrade Cache_Lite
  */
 function testCachelite()
 {
     // cachelite params
     $cache_dir = dirname(__FILE__) . '/tmp/';
     $ttl = 360;
     epMkDir($cache_dir);
     // instantiate cache
     include_once EP_SRC_CACHE . '/epCacheCachelite.php';
     try {
         $this->assertTrue($cache = new epCacheCachelite($cache_dir, $ttl));
         $this->assertTrue($this->_testCache($cache));
     } catch (Exception $e) {
     }
     epRmDir($cache_dir);
 }
Exemple #2
0
 /**
  * remove output dir in teardown
  */
 function tearDown()
 {
     epRmDir(dirname(__FILE__) . '/output');
 }
 /**
  * Delete all existing objects
  */
 function _end()
 {
     $m = epManager::instance();
     $m->deleteAll('eptBase');
     $m->deleteAll('eptAuthor');
     $m->deleteAll('eptBook');
     $m->deleteAll('eptBookstore');
     $m->deleteAll('eptContact');
     @unlink(dirname(__FILE__) . '/ezpdo.log');
     @unlink('books.db');
     @epRmDir(dirname(__FILE__) . '/compiled');
     return true;
 }
 /**
  * tearDown: rmove output dir 
  */
 public function tearDown()
 {
     epRmDir('output');
 }