XCacheTest.php 489 Bytes
Newer Older
1 2 3 4 5 6 7
<?php
namespace yiiunit\framework\caching;
use yii\caching\XCache;

/**
 * Class for testing xcache backend
 */
Alexander Makarov committed
8
class XCacheTest extends CacheTestCase
9 10 11 12 13 14 15 16
{
	private $_cacheInstance = null;

	/**
	 * @return XCache
	 */
	protected function getCacheInstance()
	{
resurtm committed
17
		if (!function_exists("xcache_isset")) {
18 19 20
			$this->markTestSkipped("XCache not installed. Skipping.");
		}

resurtm committed
21
		if ($this->_cacheInstance === null) {
22 23 24 25
			$this->_cacheInstance = new XCache();
		}
		return $this->_cacheInstance;
	}
Zander Baldwin committed
26
}