public function setUp() { parent::setup(); if (!extension_loaded('mysqlnd')) { $this->markTestSkipped('The MySQLnd extension is not available.'); } $this->cache = new Cache(new MySQL($this->config['mysql']['host'], $this->config['mysql']['user'], $this->config['mysql']['password'], $this->config['mysql']['database'], $this->config['mysql']['port'])); }
public function setUp() { parent::setup(); if (!class_exists('Mongo')) { $this->markTestSkipped('The Mongo extension is not available.'); } $this->cache = new Cache(new Mongo($this->config['mongo']['dns'])); }
public function setUp() { parent::setup(); if (!extension_loaded('apc') || !ini_get('apc.enable_cli')) { $this->markTestSkipped('The APC extension is not available.'); } $this->cache = new Cache(new Apc()); }
public function setUp() { parent::setup(); if (!extension_loaded('memcached') || !class_exists('\\Memcache')) { $this->markTestSkipped('The Memcache extension is not available.'); } $adapter = new MemCache(); $adapter->addServer('localhost', 11211); $this->cache = new Cache($adapter); }
public function setUp() { parent::setup(); if (!extension_loaded('memcached') || !class_exists('\\Memcached')) { $this->markTestSkipped('The Memcached extension is not available.'); } $data = [['host' => 'localhost', 'port' => 11211, 'weight' => 0]]; $adapter = new Memcached($data); $this->cache = new Cache($adapter); }
public function setUp() { parent::setup(); $this->cache = new Cache(new File($this->config['file']['dir'])); }
public function setUp() { parent::setup(); $this->cache = new Cache(new Redis()); }