/**
  * @param string $path [Optional] Temporary path from which the Configuration framework
  * should load files. This is useful when writing temp files to disk for funtional tests
  */
 public static function reset($path = null)
 {
     if (!self::$pathField) {
         self::$pathField = Reflection_Helper::get_property('Bart\\Configuration\\Configuration', 'path');
         self::$configCacheField = Reflection_Helper::get_property('Bart\\Configuration\\Configuration', 'configCache');
     }
     self::$pathField->setValue(null, $path);
     self::$configCacheField->setValue(null, []);
 }
Beispiel #2
0
 private static function getSafeCommandFrom(Command $c)
 {
     $field = \Bart\Util\Reflection_Helper::get_property('Bart\\Shell\\Command', 'safeCommandStr');
     return $field->getValue($c);
 }
Beispiel #3
0
 /**
  * @param array $configsArray The new internal configurations
  */
 public function configureForTesting(array $configsArray)
 {
     $this->configurations = $configsArray;
     // Some rigmarole for any methods using updateRuntimeConfiguration
     $pathField = Reflection_Helper::get_property('Bart\\Configuration\\Configuration', 'filePath');
     $pathField->setValue($this, '');
     TestConfigurationsHelper::setConfigCache($configsArray);
 }