mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-18 01:07:37 +08:00

- Better names - Removed not used MySQLTestCase - Moved base testcase for DB to db namespace - Minor style fixes
27 lines
504 B
PHP
27 lines
504 B
PHP
<?php
|
|
namespace yiiunit\framework\caching;
|
|
use yii\caching\MemCache;
|
|
|
|
/**
|
|
* Class for testing memcache cache backend
|
|
*/
|
|
class MemCacheTest extends CacheTestCase
|
|
{
|
|
private $_cacheInstance = null;
|
|
|
|
/**
|
|
* @return MemCache
|
|
*/
|
|
protected function getCacheInstance()
|
|
{
|
|
if (!extension_loaded("memcache")) {
|
|
$this->markTestSkipped("memcache not installed. Skipping.");
|
|
}
|
|
|
|
if ($this->_cacheInstance === null) {
|
|
$this->_cacheInstance = new MemCache();
|
|
}
|
|
return $this->_cacheInstance;
|
|
}
|
|
}
|