Files
yii2/tests/unit/framework/caching/WinCacheTest.php
Alexander Makarov 7cd9123c3b Tests cleanup
- Better names
- Removed not used MySQLTestCase
- Moved base testcase for DB to db namespace
- Minor style fixes
2013-05-24 18:35:00 +04:00

31 lines
613 B
PHP

<?php
namespace yiiunit\framework\caching;
use yii\caching\WinCache;
/**
* Class for testing wincache backend
*/
class WinCacheTest extends CacheTestCase
{
private $_cacheInstance = null;
/**
* @return WinCache
*/
protected function getCacheInstance()
{
if (!extension_loaded('wincache')) {
$this->markTestSkipped("Wincache not installed. Skipping.");
}
if (!ini_get('wincache.ucenabled')) {
$this->markTestSkipped("Wincache user cache disabled. Skipping.");
}
if ($this->_cacheInstance === null) {
$this->_cacheInstance = new WinCache();
}
return $this->_cacheInstance;
}
}