示例#1
1
 /**
  * @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();
 }
示例#2
0
 /**
  * @requires extension redis
  */
 protected function setUp()
 {
     if (!extension_loaded('apcu')) {
         $this->markTestSkipped('apcu extension not installed');
     }
     apc_clear_cache('user');
     parent::setUp();
 }
示例#3
0
 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();
 }
示例#4
0
 /**
  * @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();
 }
示例#5
0
 /**
  * @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();
 }
示例#6
0
 /**
  * @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();
 }