/** * @requires extension redis */ protected function setUp() { if (!extension_loaded('redis')) { $this->markTestSkipped('redis extension not installed'); } $this->redis = new \Redis(); if (false === @$this->redis->connect('127.0.0.1')) { unset($this->redis); $this->markTestSkipped('Could not connect to Redis instance'); } $this->redis->flushAll(); parent::setUp(); }
/** * @requires extension redis */ protected function setUp() { if (!extension_loaded('apcu')) { $this->markTestSkipped('apcu extension not installed'); } apc_clear_cache('user'); parent::setUp(); }
protected function setUp() { $this->predis = new Client(); if (true !== $this->predis->ping()) { unset($this->predis); $this->markTestSkipped('Could not ping Redis instance'); } $this->predis->flushAll(); parent::setUp(); }
/** * @requires extension apcu */ protected function setUp() { if (!extension_loaded('apcu')) { $this->markTestSkipped('apcu extension not installed'); } if ((bool) ini_get('apc.enable_cli') === false) { $this->markTestSkipped('apcu extension not enabled for CLI'); } apcu_clear_cache(); parent::setUp(); }
/** * @inheritdoc */ protected function setUp() { $dir = $this->getCacheDir(); if (is_dir($dir)) { foreach (new \FilesystemIterator($dir) as $file) { unlink($file); } rmdir($dir); } mkdir($dir); parent::setUp(); }
/** * @requires extension memcached */ protected function setUp() { if (!extension_loaded('memcached')) { $this->markTestSkipped('memcached extension not installed'); } $this->memcached = new \Memcached(); $this->memcached->addServer('127.0.0.1', 11211); $this->memcached->flush(); if (@fsockopen('127.0.0.1', 11211) === false) { unset($this->memcached); $this->markTestSkipped('Could not connect to Memcached instance'); } parent::setUp(); }