function testOverrideUseRealFile() { $ini = new Ini(LIMB_DIR . '/tests/cases/util/ini_test2.ini', false); $this->assertTrue($ini->hasGroup('test1')); $this->assertTrue($ini->hasGroup('test2')); $this->assertEqual($ini->getOption('v1', 'test1'), 1); $this->assertEqual($ini->getOption('v2', 'test1'), 2); $this->assertEqual($ini->getOption('v3', 'test1'), 3); $this->assertEqual($ini->getOption('v1', 'test2'), 1); }
protected function _doGet($key, $filename, $locale_id) { $path = $this->_getPath($filename, $locale_id); if(isset($this->_cache[$path][$key])) return $this->_cache[$path][$key]; if(isset($this->_ini_objects[$path])) $ini = $this->_ini_objects[$path]; else { $ini = new Ini($path); $this->_ini_objects[$path] = $ini; } if($value = $ini->getOption($key, 'constants')) $this->_cache[$path][$key] = $value; return $value; }