diff --git a/tests/thinkphp/library/think/cache/driver/apcTest.php b/tests/thinkphp/library/think/cache/driver/apcTest.php deleted file mode 100644 index 92e3c131..00000000 --- a/tests/thinkphp/library/think/cache/driver/apcTest.php +++ /dev/null @@ -1,53 +0,0 @@ - -// +---------------------------------------------------------------------- - -/** - * Apc缓存驱动测试 - * @author mahuan - */ - -namespace tests\thinkphp\library\think\cache\driver; - -class apcTest extends cacheTestCase -{ - private $_cacheInstance = null; - /** - * 基境缓存类型 - */ - protected function setUp() - { - if (!extension_loaded("apc")) { - $this->markTestSkipped("APC没有安装,已跳过测试!"); - } elseif ('cli' === PHP_SAPI && !ini_get('apc.enable_cli')) { - $this->markTestSkipped("APC模块没有开启,已跳过测试!"); - } - \think\Cache::connect(array('type' => 'apc', 'expire' => 2)); - } - /** - * @return ApcCache - */ - protected function getCacheInstance() - { - if (null === $this->_cacheInstance) { - $this->_cacheInstance = new \think\cache\driver\Apc(['length' => 3]); - } - return $this->_cacheInstance; - } - /** - * 缓存过期测试《提出来测试,因为目前看通不过缓存过期测试,所以还需研究》 - * @return mixed - * @access public - */ - public function testExpire() - { - } - -} diff --git a/tests/thinkphp/library/think/cache/driver/testTest.php b/tests/thinkphp/library/think/cache/driver/testTest.php deleted file mode 100644 index cb6ae573..00000000 --- a/tests/thinkphp/library/think/cache/driver/testTest.php +++ /dev/null @@ -1,70 +0,0 @@ - -// +---------------------------------------------------------------------- - -/** - * Test缓存驱动测试 - * @author 刘志淳 - */ - -namespace tests\thinkphp\library\think\cache\driver; - -use think\Cache; - -class testTest extends \PHPUnit_Framework_TestCase -{ - /** - * 测试缓存读取 - * @return mixed - * @access public - */ - public function testGet() - { - $cache = Cache::connect(['type' => 'Test']); - - $this->assertFalse($cache->get('test')); - } - - /** - * 测试缓存设置 - * @return mixed - * @access public - */ - public function testSet() - { - $cache = Cache::connect(['type' => 'Test']); - - $this->assertTrue($cache->set('test', 'test')); - } - - /** - * 删除缓存测试 - * @return mixed - * @access public - */ - public function testRm() - { - $cache = Cache::connect(['type' => 'Test']); - - $this->assertTrue($cache->rm('test')); - } - - /** - * 清空缓存测试 - * @return mixed - * @access public - */ - public function testClear() - { - $cache = Cache::connect(['type' => 'Test']); - - $this->assertTrue($cache->clear()); - } -}