Exemplo n.º 1
0
 public function testFlush()
 {
     parent::testFlush();
     $this->assertTableHasNRecords('jlx_cache', 3);
     $this->assertTrue(jCache::flush($this->profile));
     $this->assertTableIsEmpty('jlx_cache');
 }
Exemplo n.º 2
0
 public function testFlush()
 {
     parent::testFlush();
     $this->assertTrue(file_exists(jApp::tempPath() . 'cache/usingfile/jelix_cache___flush1DataKey.cache'));
     $this->assertTrue(file_exists(jApp::tempPath() . 'cache/usingfile/jelix_cache___flush2DataKey.cache'));
     $this->assertTrue(file_exists(jApp::tempPath() . 'cache/usingfile/jelix_cache___flush3DataKey.cache'));
     $this->assertTrue(jCache::flush($this->profile));
     $this->assertFalse(file_exists(jApp::tempPath() . 'cache/usingfile/jelix_cache___flush1DataKey.cache'));
     $this->assertFalse(file_exists(jApp::tempPath() . 'cache/usingfile/jelix_cache___flush2DataKey.cache'));
     $this->assertFalse(file_exists(jApp::tempPath() . 'cache/usingfile/jelix_cache___flush3DataKey.cache'));
 }
Exemplo n.º 3
0
 public function testFlush()
 {
     parent::testFlush();
     $mmc = memcache_connect($this->mmhost, $this->mmport);
     $this->assertTrue(memcache_get($mmc, 'flush1DataKey'));
     $this->assertTrue(memcache_get($mmc, 'flush2DataKey'));
     $this->assertTrue(memcache_get($mmc, 'flush3DataKey'));
     $this->assertTrue(jCache::flush($this->profile));
     $this->assertFalse(memcache_get($mmc, 'flush1DataKey'));
     $this->assertFalse(memcache_get($mmc, 'flush2DataKey'));
     $this->assertFalse(memcache_get($mmc, 'flush3DataKey'));
 }