diff --git a/tests/thinkphp/library/think/cache/driver/fileTest.php b/tests/thinkphp/library/think/cache/driver/fileTest.php new file mode 100644 index 00000000..1b2d3c6f --- /dev/null +++ b/tests/thinkphp/library/think/cache/driver/fileTest.php @@ -0,0 +1,54 @@ + +// +---------------------------------------------------------------------- + +/** + * File缓存驱动测试 + * @author 刘志淳 + */ + +namespace tests\thinkphp\library\think\cache\driver; + +class fileTest extends cacheTestCase +{ + private $_cacheInstance = null; + + /** + * 基境缓存类型 + */ + protected function setUp() + { + \think\Cache::connect(array('type' => 'File', 'expire' => 2)); + } + + /** + * @return FileCache + */ + protected function getCacheInstance() + { + if (null === $this->_cacheInstance) { + $this->_cacheInstance = new \think\cache\driver\File([ + 'expire'=>2, + 'path'=> CACHE_PATH, + ]); + } + return $this->_cacheInstance; + } + + // 待调整后测试 + public function testExpire() + { + } + + public function testQueue() + { + } + +}