Example #1
0
 /**
  * @param array $config
  * @return AppInterface
  */
 public static function getInstance(array $config = [])
 {
     if (self::$instance === null) {
         self::$instance = new self(Config::prependConfig(__DIR__ . '/../config', $config));
     }
     return self::$instance;
 }
Example #2
0
 public function testPrepend()
 {
     $config = \jakulov\Corpuscle\Core\Config::load(__DIR__ . '/config', 'test');
     $config = \jakulov\Corpuscle\Core\Config::prependConfig(__DIR__ . '/prepend_config', $config);
     $this->assertEquals('value', $config['app']['test']);
     $this->assertEquals('prepend_value', $config['app']['prepend_test']);
     $this->assertEquals('that_is_ok', $config['prepend']);
 }