Subversion-Projekte lars-tiefland.php_share

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

--TEST--
CacheXCache::is_expired()

--SKIPIF--
<?php
        if (!function_exists('xcache_set')) print 'skip XCache extension not available';
?>

--FILE--
<?php
        require_once dirname(__FILE__) . '/../cachecore.class.php';
        require_once dirname(__FILE__) . '/../cachexcache.class.php';
        $cache = new CacheXCache('test', null, 1);
        $cache->create('test data');
        var_dump($cache->is_expired());
        sleep(2);
        var_dump($cache->is_expired());
?>

--EXPECT--
bool(false)
bool(false)

--CLEAN--
<?php
        require_once dirname(__FILE__) . '/../cachecore.class.php';
        require_once dirname(__FILE__) . '/../cachexcache.class.php';
        $cache = new CacheXCache('test', null, 60);
        $cache->delete();
?>