mirror of
https://github.com/friendica/friendica
synced 2025-04-23 08:30:10 +00:00
Introduce "static/env.config.php" for environment variable mapping to config cache entries
- Added new database.port config value (used for MYSQL_PORT) - Removed now obsolete db environment variable functionality - Added functionality to load env variables (overwrites DB based cached)
This commit is contained in:
parent
3587e89482
commit
d39ee428f0
8 changed files with 93 additions and 8 deletions
|
@ -94,6 +94,19 @@ class CacheTest extends MockedTest
|
|||
|
||||
$this->assertEquals($override['system']['test'], $configCache->get('system', 'test'));
|
||||
$this->assertEquals($override['system']['boolTrue'], $configCache->get('system', 'boolTrue'));
|
||||
|
||||
// Don't overwrite server ENV variables - even in load mode
|
||||
$configCache->load($data, Cache::SOURCE_DB);
|
||||
|
||||
$this->assertEquals($override['system']['test'], $configCache->get('system', 'test'));
|
||||
$this->assertEquals($override['system']['boolTrue'], $configCache->get('system', 'boolTrue'));
|
||||
|
||||
// Overwrite ENV variables with ENV variables
|
||||
$configCache->load($data, Cache::SOURCE_ENV);
|
||||
|
||||
$this->assertConfigValues($data, $configCache);
|
||||
$this->assertNotEquals($override['system']['test'], $configCache->get('system', 'test'));
|
||||
$this->assertNotEquals($override['system']['boolTrue'], $configCache->get('system', 'boolTrue'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue