改进Query类的lazyWrite方法 改进缓存单元测试 核心去除redis缓存驱动

This commit is contained in:
thinkphp
2016-07-25 13:37:45 +08:00
parent e5dd77ea26
commit e74907f5c9
6 changed files with 41 additions and 634 deletions

View File

@@ -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