From 92e7ca7a1b982a81cc62584860dd1184c9e8b77f Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 28 Feb 2016 22:31:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0queue=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thinkphp/library/think/cache/driver/apcTest.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/thinkphp/library/think/cache/driver/apcTest.php b/tests/thinkphp/library/think/cache/driver/apcTest.php index 981f114e..373ba003 100644 --- a/tests/thinkphp/library/think/cache/driver/apcTest.php +++ b/tests/thinkphp/library/think/cache/driver/apcTest.php @@ -37,7 +37,7 @@ class apcTest extends cacheTestCase protected function getCacheInstance() { if (null === $this->_cacheInstance) { - $this->_cacheInstance = new \think\cache\driver\Apc(); + $this->_cacheInstance = new \think\cache\driver\Apc(['length' => 3]); } return $this->_cacheInstance; } @@ -49,4 +49,15 @@ class apcTest extends cacheTestCase public function testExpire() { } + + public function testQueue() + { + $cache = $this->getCacheInstance(); + $this->assertTrue($cache->set('1', '1')); + $this->assertTrue($cache->set('2', '2')); + $this->assertTrue($cache->set('3', '3')); + $this->assertEquals(1, $cache->get('1')); + $this->assertTrue($cache->set('4', '4')); + $this->assertFalse($cache->get('1')); + } }