Exemple #1
0
 public function testCachableConfig()
 {
     $configCache = new ConfigCache(new ConfigFactory(), $this->cacheDir);
     $config = $configCache->load($this->configPath)->getConfig();
     $this->assertEquals('bar', $config['foo']);
     $this->assertTrue(file_exists($this->cachePath));
 }
Exemple #2
0
 /**
  * Load application configuration
  *
  * This method first try to load it from filesystem cache
  * If cache not exists it will parse config.yml file from
  *
  * @return Config
  */
 protected function buildConfig()
 {
     $configCache = new ConfigCache(new ConfigFactory(), $this->getCachePath() . '/internal');
     return $configCache->load($this->getConfigPath() . '/config.yml')->getConfig();
 }