/** * Read configuration file and return its contents * By default attempts to read an ini file with the same name as this class * * @param string $path Path to configuration ini file * * @return array */ protected function readConfig($path = '') { if (empty($path)) { $path = $this->appName . '.ini'; } $result = array('oneInstanceOnly' => true, 'consoleOnly' => true); if (file_exists($path)) { $configula = new \Configula\Config(); $result = array_merge($result, $configula->parseConfigFile($path)); } return $result; }
public function testNumberedConfiguatroniArrayKeysAreNotClobbered() { $obj = new Configula\Config(); $result = $obj->parseConfigFile($this->configPath . '/../php/numbered.php'); $this->assertEquals(array(1, 2, 3, 5), array_keys($result)); }