1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php

32 lines
814 B
PHP
Raw Normal View History

2009-07-15 02:36:09 +04:00
<?php
namespace Doctrine\Tests\Common\Cache;
use Doctrine\Common\Cache\MemcacheCache;
require_once __DIR__ . '/../../TestInit.php';
class MemcacheCacheTest extends CacheTest
2009-07-15 02:36:09 +04:00
{
private $_memcache;
2009-07-15 02:36:09 +04:00
public function setUp()
{
if (extension_loaded('memcache')) {
$this->_memcache = new \Memcache;
$ok = @$this->_memcache->connect('localhost', 11211);
if (!$ok) {
$this->markTestSkipped('The ' . __CLASS__ .' requires the use of memcache');
}
} else {
2009-07-15 02:36:09 +04:00
$this->markTestSkipped('The ' . __CLASS__ .' requires the use of memcache');
}
}
protected function _getCacheDriver()
2009-07-15 02:36:09 +04:00
{
$driver = new MemcacheCache();
$driver->setMemcache($this->_memcache);
return $driver;
2009-07-15 02:36:09 +04:00
}
}