Ejemplo n.º 1
0
 public function testReadReturnsConfig()
 {
     $reader = new Reader();
     $config = $reader->read(sprintf('%s/data/sample.ini', __DIR__));
     $this->assertInstanceOf('Edefine\\Framework\\Config\\Config', $config);
     $this->assertEquals('baz', $config->get('foo.bar'));
 }
Ejemplo n.º 2
0
 /**
  * @return Config\Config
  */
 public function getConfig()
 {
     if (!isset($this->services['config'])) {
         $reader = new Config\Reader();
         $this->services['config'] = $reader->read(sprintf('%s/config.ini', APP_DIR));
     }
     return $this->services['config'];
 }