单元测试完善

This commit is contained in:
thinkphp
2016-09-14 17:07:49 +08:00
parent e37f5aee16
commit c38e235f03
2 changed files with 21 additions and 1 deletions

View File

@@ -166,6 +166,18 @@ abstract class cacheTestCase extends \PHPUnit_Framework_TestCase
$this->assertFalse($cache->get('number_test'));
}
/**
* 获取并删除缓存测试
* @return mixed
* @access public
*/
public function testPull()
{
$cache = $this->prepare();
$this->assertEquals(11, $cache->pull('number_test'));
$this->assertFalse($cache->get('number_test'));
}
/**
* 清空缓存测试
* @return mixed