/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { $this->_subscriber = array($this, 'countingCallback'); $this->_incCount = 0; $this->_lastData = null; $this->_lastOb = null; BaseObject::destroyCache(); self::$_staticIncCount = 0; }
private function cache_driver() { if (empty(self::$_cache_driver)) { require_once "class.basecache.php"; try { self::$_cache_driver = CacheProviderFactory::get_provider('memcached'); } catch (Exception $e) { # Memcached not supported. self::$_cache_driver = CacheProviderFactory::get_provider('memory'); } } return self::$_cache_driver; }