增加缓存驱动的queue测试

This commit is contained in:
thinkphp
2016-02-28 22:37:10 +08:00
parent 92e7ca7a1b
commit e3a95fe994
4 changed files with 13 additions and 12 deletions

View File

@@ -159,4 +159,15 @@ abstract class cacheTestCase extends \PHPUnit_Framework_TestCase
$this->assertEquals('a', Cache::get('a'));
$this->assertNotNull(Cache::rm('a'));
}
public function testQueue()
{
$cache = $this->prepare();
$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'));
}
}