Make it possible to import exportet app/system configs

This commit is contained in:
Joas Schilling 2015-07-07 11:25:29 +02:00
parent 971060862e
commit e5bc9d0619
2 changed files with 25 additions and 7 deletions

View file

@ -88,7 +88,9 @@ class ListConfigs extends Base {
switch ($app) {
case 'system':
$configs = $this->getSystemConfigs($noSensitiveValues);
$configs = [
'system' => $this->getSystemConfigs($noSensitiveValues),
];
break;
case 'all':
@ -103,7 +105,11 @@ class ListConfigs extends Base {
break;
default:
$configs = $this->appConfig->getValues($app, false);
$configs = [
'apps' => [
$app => $this->appConfig->getValues($app, false),
],
];
}
$this->writeArrayInOutputFormat($input, $output, $configs);

View file

@ -151,7 +151,9 @@ class ListConfigsTest extends TestCase {
],
true,
json_encode([
'overwrite.cli.url' => 'http://localhost',
'system' => [
'overwrite.cli.url' => 'http://localhost',
],
]),
],
[
@ -176,8 +178,10 @@ class ListConfigsTest extends TestCase {
],
false,
json_encode([
'secret' => 'my secret',
'overwrite.cli.url' => 'http://localhost',
'system' => [
'secret' => 'my secret',
'overwrite.cli.url' => 'http://localhost',
],
]),
],
[
@ -202,7 +206,11 @@ class ListConfigsTest extends TestCase {
],
true,
json_encode([
'enabled' => 'yes',
'apps' => [
'files' => [
'enabled' => 'yes',
],
],
]),
],
[
@ -227,7 +235,11 @@ class ListConfigsTest extends TestCase {
],
false,
json_encode([
'enabled' => 'yes',
'apps' => [
'files' => [
'enabled' => 'yes',
],
],
]),
],
];