Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / common / tests / Doctrine / Tests / Common / Cache / RedisCacheTest.php
1 <?php
2
3 namespace Doctrine\Tests\Common\Cache;
4
5 use Doctrine\Common\Cache\RedisCache;
6
7 class RedisCacheTest extends CacheTest
8 {
9     private $_redis;
10
11     public function setUp()
12     {
13         if (extension_loaded('redis')) {
14             $this->_redis = new \Redis();
15             $ok = @$this->_redis->connect('127.0.0.1');
16             if (!$ok) {
17                 $this->markTestSkipped('The ' . __CLASS__ .' requires the use of redis');
18             }
19         } else {
20             $this->markTestSkipped('The ' . __CLASS__ .' requires the use of redis');
21         }
22     }
23
24     protected function _getCacheDriver()
25     {
26         $driver = new RedisCache();
27         $driver->setRedis($this->_redis);
28         return $driver;
29     }
30 }