Phalcon\Test\Cache\Backend\AerospikeTest::testShouldGetKeys PHP Method

testShouldGetKeys() public method

public testShouldGetKeys ( )
    public function testShouldGetKeys()
    {
        $cache = $this->getAdapter(null);
        $this->assertEquals(0, count($cache->queryKeys()));
        $cache->save('a', 1, 10);
        $cache->save('long-key', 'long-val', 10);
        $cache->save('bcd', 3, 10);
        $this->keys[] = 'a';
        $this->keys[] = 'long-key';
        $this->keys[] = 'bcd';
        $keys = $cache->queryKeys();
        sort($keys);
        $this->assertEquals(['a', 'bcd', 'long-key'], $keys);
        $this->assertEquals(['long-key'], $cache->queryKeys('long'));
    }