public function MemcachedCacheTest::setUp in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php \Doctrine\Tests\Common\Cache\MemcachedCacheTest::setUp()
File
- vendor/
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');
}
}