Ejemplo n.º 1
0
 public function testExistsAndKeys()
 {
     $cacheKey = 'test.exists';
     $exists = Cache::exists($cacheKey);
     $this->assertFalse($exists);
     Cache::set($cacheKey, 'foo');
     $exists = Cache::exists($cacheKey);
     $this->assertTrue($exists);
     // Bug in version < 3.0.2: query keys with prefix in file cache
     if ($_SERVER['PHWOOLCON_PHALCON_VERSION'] >= 3000200) {
         $keys = Cache::queryKeys($cacheKey);
     } else {
         $keys = Cache::queryKeys();
     }
     $this->assertNotEmpty($keys);
 }