public function testClear()
 {
     $this->databaseCache->cacheTable('Tests');
     $this->databaseCache->setIntoCache('Tests', 'key', array('aa' => 'bb'));
     $this->assertEquals(array('aa' => 'bb'), $this->databaseCache->getFromCache('Tests', 'key'));
     $this->databaseCache->clear();
     $this->assertFalse($this->databaseCache->getFromCache('Tests', 'key'), 'All values were removed from cache.');
 }
Exemplo n.º 2
0
 /**
  * Frees consumed memory.
  *
  * @return void
  *
  * @codeCoverageIgnore
  */
 protected function freeMemoryManually()
 {
     parent::freeMemoryManually();
     $this->_databaseCache->clear();
 }