Exemple #1
0
 public function test_envOverrides()
 {
     // Override default with jbraynard, and override either with test
     $resolver = new ConfigResolver(array('jbraynard', 'test'));
     $configs = $resolver->resolve(array('favorites' => array('color' => array('jbraynard' => 'pink'), 'food' => array('' => 'turkey', 'test' => 'small portions', 'jbraynard' => 'tofu'), 'failure' => array('jbraynard' => 'things on youtube', 'test' => 'stack overflow'), 'music' => array('' => 'jazz'))));
     $favs = $configs['favorites'];
     $this->assertEquals('pink', $favs['color'], 'color');
     $this->assertEquals('small portions', $favs['food'], 'food');
     $this->assertEquals('stack overflow', $favs['failure'], 'failure');
     $this->assertEquals('jazz', $favs['music'], 'music');
 }
 protected function getForeignPath($file, $lang)
 {
     return str_replace(ConfigResolver::get('prior_language'), $lang, $file->getPath());
 }