public function MemcachedCacheTest::setUp in Plug 7
File
- lib/
doctrine/ cache/ tests/ Doctrine/ Tests/ Common/ Cache/ MemcachedCacheTest.php, line 12  
Class
Namespace
Doctrine\Tests\Common\CacheCode
public function setUp() {
  if (!extension_loaded('memcached')) {
    $this
      ->markTestSkipped('The ' . __CLASS__ . ' requires the use of memcached');
  }
  $this->memcached = new Memcached();
  $this->memcached
    ->setOption(Memcached::OPT_COMPRESSION, false);
  $this->memcached
    ->addServer('127.0.0.1', 11211);
  if (@fsockopen('127.0.0.1', 11211) === false) {
    unset($this->memcached);
    $this
      ->markTestSkipped('The ' . __CLASS__ . ' cannot connect to memcache');
  }
}