/** * singleton function to return * the instance of the class * * @return Memcache or NoCache */ public static function singleton() { if (!Cache::$enabled) { return NoCache::singleton(); } if (!self::$instance) { self::$instance = new MemcacheCache(); } return self::$instance; }
public function testGetStats() { $this->assertTrue(is_array($this->object->getStats())); }