示例#1
0
 public function testCacheCanBeCleared()
 {
     $this->cache->set('name 1', 'Marcos');
     $this->cache->set('name 2', 'Marcos');
     $this->cache->set('name 3', 'Marcos');
     $this->assertEquals(3, count($this->cache));
     $this->cache->clear();
     $this->assertEquals(0, count($this->cache));
 }
示例#2
0
 public function testConfigurationFilesCanBeReadFromTheCache()
 {
     $data = [1, 2, 3];
     $cache = new RuntimeCache();
     $cache->set('configuration_not_exists', $data);
     $this->conf->setCache($cache);
     $all = $this->conf->load('configuration_not_exists');
     $this->assertEquals($all, $data);
 }