示例#1
0
 /**
  * Test that dump() makes files read() can read.
  *
  * @return void
  */
 public function testDumpRead()
 {
     $engine = new IniConfig(TMP);
     $engine->dump('test', $this->testData);
     $result = $engine->read('test');
     unlink(TMP . 'test.ini');
     $expected = $this->testData;
     $expected['One']['is_null'] = false;
     $this->assertEquals($expected, $result);
 }
示例#2
0
 /**
  * Parses an INI file and returns an array that reflects the
  * INI file's section structure. Double-quote friendly.
  *
  * @param string $filename File
  * @return array INI section structure
  */
 public function readConfigFile($filename)
 {
     $iniFile = new IniConfig(dirname($filename) . DS);
     return $iniFile->read(basename($filename));
 }