mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
改进Query类的lazyWrite方法 改进缓存单元测试 核心去除redis缓存驱动
This commit is contained in:
@@ -62,6 +62,28 @@ abstract class cacheTestCase extends \PHPUnit_Framework_TestCase
|
||||
$this->assertTrue($cache->set('array_test', ['array_test' => 'array_test']));
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试缓存自增
|
||||
* @return mixed
|
||||
* @access public
|
||||
*/
|
||||
public function testInc()
|
||||
{
|
||||
$cache = $this->getCacheInstance();
|
||||
$this->assertEquals(14, $cache->inc('number_test', 3));
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试缓存自减
|
||||
* @return mixed
|
||||
* @access public
|
||||
*/
|
||||
public function testDec()
|
||||
{
|
||||
$cache = $this->getCacheInstance();
|
||||
$this->assertEquals(8, $cache->dec('number_test', 6));
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试缓存读取,包括测试字符串、整数、数组和对象
|
||||
* @return mixed
|
||||
|
||||
Reference in New Issue
Block a user