From 2bee2593d8283589544fb7c46f88ee5ef7518ea3 Mon Sep 17 00:00:00 2001 From: chunice Date: Fri, 4 Mar 2016 13:35:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0File=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../library/think/cache/driver/fileTest.php | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 tests/thinkphp/library/think/cache/driver/fileTest.php 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() + { + } + +} From 6eb163bf094aedd62f9f2f579b3ec8a699866d3b Mon Sep 17 00:00:00 2001 From: chunice Date: Fri, 4 Mar 2016 14:32:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=8C=E5=96=84Build=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/thinkphp/library/think/buildTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/thinkphp/library/think/buildTest.php b/tests/thinkphp/library/think/buildTest.php index 18241e1a..20e7d322 100644 --- a/tests/thinkphp/library/think/buildTest.php +++ b/tests/thinkphp/library/think/buildTest.php @@ -66,6 +66,7 @@ class buildTest extends \PHPUnit_Framework_TestCase } } } + $this->assertFileExists(APP_PATH . ($module ? $module . DS : '') . 'config.php'); } } }