示例#1
0
 public function setUp()
 {
     parent::setup();
     if (!extension_loaded('mysqli')) {
         $this->markTestSkipped('The mysqli extension is not available.');
     }
     $this->cache = new Cache(new Mysqli(new \mysqli($this->config['mysql']['host'], $this->config['mysql']['user'], $this->config['mysql']['password'], $this->config['mysql']['database'], $this->config['mysql']['port'])));
 }
示例#2
0
 public function setUp()
 {
     parent::setup();
     if (!class_exists('\\Predis\\Client')) {
         $this->markTestSkipped('The predis library is not available.');
     }
     $this->cache = new Cache(new Predis());
 }
示例#3
0
 public function setUp()
 {
     parent::setup();
     if (!extension_loaded('memcached') || !class_exists('\\Memcached')) {
         $this->markTestSkipped('The Memcached extension is not available.');
     }
     $adapter = new Memcached();
     $this->cache = new Cache($adapter);
 }
示例#4
0
 public function setUp()
 {
     parent::setup();
     if (!extension_loaded('mongo')) {
         $this->markTestSkipped('The mongo extension is not available.');
     }
     $client = new \MongoClient($this->config['mongo']['dsn']);
     $database = $client->selectDB($this->config['mongo']['database']);
     $this->cache = new Cache(new Mongo($database));
 }
示例#5
0
 public function setUp()
 {
     parent::setup();
     $this->cache = new Cache(new File($this->config['file']['dir']));
 }