You are here

public function MemcacheCacheTest::setUp in Plug 7

File

lib/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php, line 12

Class

MemcacheCacheTest

Namespace

Doctrine\Tests\Common\Cache

Code

public function setUp() {
  if (!extension_loaded('memcache')) {
    $this
      ->markTestSkipped('The ' . __CLASS__ . ' requires the use of memcache');
  }
  $this->memcache = new Memcache();
  if (@$this->memcache
    ->connect('localhost', 11211) === false) {
    unset($this->memcache);
    $this
      ->markTestSkipped('The ' . __CLASS__ . ' cannot connect to memcache');
  }
}