Example #1
0
 /**
  * Filling the config object with individual testcase data and injecting it into the registry.
  */
 public static function setConfigInRegistry($configData)
 {
     if (static::$config === null) {
         if (!Registry::has('config') && file_exists(CONFIG_PATH . '/config.php')) {
             static::$config = new Config();
             static::$config->loadConfigFromFile(CONFIG_PATH . '/config.php');
             foreach ($configData as $configKey => $configValue) {
                 static::$config->set($configKey, $configValue);
             }
         }
     }
     Registry::remove('config');
     Registry::set('config', self::$config);
 }
Example #2
0
 /**
  * Tests if a set config can be given back without a manipulation.
  */
 public function testSetAndGetConfig()
 {
     $this->config->set('email', '*****@*****.**');
     $this->assertEquals('*****@*****.**', $this->config->get('email'), 'Config value got manipulated unexpectedly.');
 }