adapt minor changers / fix tests
This commit is contained in:
parent
73aaedac97
commit
c2d11328cc
3 changed files with 6 additions and 6 deletions
|
@ -59,12 +59,12 @@ interface IManageConfigValues
|
||||||
public function get(string $cat, string $key = null, $default_value = null);
|
public function get(string $cat, string $key = null, $default_value = null);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true, if the current config cannot be changed
|
* Returns true, if the current config can be changed
|
||||||
*
|
*
|
||||||
* @param string $cat The category of the configuration value
|
* @param string $cat The category of the configuration value
|
||||||
* @param string $key The configuration key to query
|
* @param string $key The configuration key to query
|
||||||
*
|
*
|
||||||
* @return bool true, if set is disabled
|
* @return bool true, if writing is possible
|
||||||
*/
|
*/
|
||||||
public function isWritable(string $cat, string $key): bool;
|
public function isWritable(string $cat, string $key): bool;
|
||||||
|
|
||||||
|
|
|
@ -613,11 +613,11 @@ class ConfigTest extends DatabaseTest
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests if environment variables leads to a disabled set
|
* Tests if environment variables can change the permission to write a config key
|
||||||
*
|
*
|
||||||
* @dataProvider dataEnv
|
* @dataProvider dataEnv
|
||||||
*/
|
*/
|
||||||
public function testIsSetDisabled(array $data, array $server, array $assertDisabled)
|
public function testIsWritable(array $data, array $server, array $assertDisabled)
|
||||||
{
|
{
|
||||||
$this->setConfigFile('static' . DIRECTORY_SEPARATOR . 'env.config.php', true);
|
$this->setConfigFile('static' . DIRECTORY_SEPARATOR . 'env.config.php', true);
|
||||||
$this->loadDirectFixture($this->configToDbArray($data), $this->getDbInstance());
|
$this->loadDirectFixture($this->configToDbArray($data), $this->getDbInstance());
|
||||||
|
@ -628,7 +628,7 @@ class ConfigTest extends DatabaseTest
|
||||||
|
|
||||||
foreach ($data as $category => $keyvalues) {
|
foreach ($data as $category => $keyvalues) {
|
||||||
foreach ($keyvalues as $key => $value) {
|
foreach ($keyvalues as $key => $value) {
|
||||||
if (!empty($assertDisabled[$category][$key])) {
|
if (empty($assertDisabled[$category][$key])) {
|
||||||
static::assertTrue($config->isWritable($category, $key), sprintf('%s.%s is not true', $category, $key));
|
static::assertTrue($config->isWritable($category, $key), sprintf('%s.%s is not true', $category, $key));
|
||||||
} else {
|
} else {
|
||||||
static::assertFalse($config->isWritable($category, $key), sprintf('%s.%s is not false', $category, $key));
|
static::assertFalse($config->isWritable($category, $key), sprintf('%s.%s is not false', $category, $key));
|
||||||
|
|
Loading…
Reference in a new issue