public function setUp()
 {
     $this->object = new MemcacheCache();
     if (!class_exists('Memcache')) {
         $this->markTestSkipped('No memcache extension');
     }
     $memcache = new \Memcache();
     if (!@$memcache->connect('localhost', 11211)) {
         $this->markTestSkipped('No memcache server');
     }
     $this->object->setMemcache($memcache);
 }
Пример #2
0
 private function createMemcache($options)
 {
     $memcache = $this->connectionFactory->getMemcacheConnection($options);
     $cache = new MemcacheCache();
     $cache->setMemcache($memcache);
     return $cache;
 }