aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/utils/config
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-05-29 12:32:14 +0200
committerArthurHoaro <arthur@hoa.ro>2016-06-11 09:30:56 +0200
commitb74b96bfbd0b778ac50fd17f5e107c51435b1678 (patch)
treefd2debc510c2c51e9b75e2081a31a10e9c02ad06 /tests/utils/config
parent684e662a58b02bde225e44d3677987b6fc3adf0b (diff)
downloadShaarli-b74b96bfbd0b778ac50fd17f5e107c51435b1678.tar.gz
Shaarli-b74b96bfbd0b778ac50fd17f5e107c51435b1678.tar.zst
Shaarli-b74b96bfbd0b778ac50fd17f5e107c51435b1678.zip
Adds ConfigJson which handle the configuration in JSON format.
Also use the Updater to make the transition
Diffstat (limited to 'tests/utils/config')
-rw-r--r--tests/utils/config/configInvalid.json.php4
-rw-r--r--tests/utils/config/configJson.json.php19
-rw-r--r--tests/utils/config/configUpdateDone.json.php4
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/utils/config/configInvalid.json.php b/tests/utils/config/configInvalid.json.php
new file mode 100644
index 00000000..c53e471d
--- /dev/null
+++ b/tests/utils/config/configInvalid.json.php
@@ -0,0 +1,4 @@
1<?php /*
2{
3 bad: bad,
4}
diff --git a/tests/utils/config/configJson.json.php b/tests/utils/config/configJson.json.php
new file mode 100644
index 00000000..71b59edd
--- /dev/null
+++ b/tests/utils/config/configJson.json.php
@@ -0,0 +1,19 @@
1<?php /*
2{
3 "redirector":"lala",
4 "login":"root",
5 "hash":"hash",
6 "salt":"salt",
7 "timezone":"Europe\/Paris",
8 "disablesessionprotection":false,
9 "privateLinkByDefault":true,
10 "title": "Shaarli",
11 "titleLink": "?",
12 "config": {
13 "foo": "bar",
14 "DATASTORE": "data\/datastore.php"
15 },
16 "plugins": {
17 "WALLABAG_VERSION": 1
18 }
19}
diff --git a/tests/utils/config/configUpdateDone.json.php b/tests/utils/config/configUpdateDone.json.php
new file mode 100644
index 00000000..a4e460d1
--- /dev/null
+++ b/tests/utils/config/configUpdateDone.json.php
@@ -0,0 +1,4 @@
1<?php /*
2{
3 "login": "root"
4}