/**
  * @covers HashBagOStuff::clear
  */
 public function testClear()
 {
     $cache = new HashBagOStuff();
     for ($i = 0; $i < 10; $i++) {
         $cache->set("key{$i}", 1);
         $this->assertEquals(1, $cache->get("key{$i}"));
     }
     $cache->clear();
     for ($i = 0; $i < 10; $i++) {
         $this->assertEquals(false, $cache->get("key{$i}"));
     }
 }
Exemple #2
0
 /**
  * Clears cache
  */
 public function clear()
 {
     $this->mGoodLinks->clear();
     $this->mBadLinks->clear();
 }