ZendDataCacheTest.php 599 Bytes
Newer Older
1 2
<?php
namespace yiiunit\framework\caching;
Alexander Makarov committed
3

Alexander Makarov committed
4
use yii\caching\Cache;
5 6 7 8
use yii\caching\ZendDataCache;

/**
 * Class for testing Zend cache backend
9 10
 * @group zenddata
 * @group caching
11
 */
Alexander Makarov committed
12
class ZendDataCacheTest extends CacheTestCase
13 14 15 16 17 18 19 20
{
	private $_cacheInstance = null;

	/**
	 * @return ZendDataCache
	 */
	protected function getCacheInstance()
	{
resurtm committed
21
		if (!function_exists("zend_shm_cache_store")) {
22 23 24
			$this->markTestSkipped("Zend Data cache not installed. Skipping.");
		}

resurtm committed
25
		if ($this->_cacheInstance === null) {
26 27 28 29
			$this->_cacheInstance = new ZendDataCache();
		}
		return $this->_cacheInstance;
	}
Zander Baldwin committed
30
}