aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/utils
diff options
context:
space:
mode:
authorArthur <arthur@hoa.ro>2016-07-09 07:19:48 +0200
committerGitHub <noreply@github.com>2016-07-09 07:19:48 +0200
commit649af5b501d2a90448242f53764ff693e9854039 (patch)
tree23cde80a7ee2949e552c48939ae22fa462cfa0fc /tests/utils
parenta9cfa38df92bd2e1e2c00a67b6ac1516a2116ade (diff)
parent5ff23f02b80ec6ddee28dee869171ee8e3656b7c (diff)
downloadShaarli-649af5b501d2a90448242f53764ff693e9854039.tar.gz
Shaarli-649af5b501d2a90448242f53764ff693e9854039.tar.zst
Shaarli-649af5b501d2a90448242f53764ff693e9854039.zip
Merge pull request #570 from ArthurHoaro/config-manager
Introduce a configuration manager
Diffstat (limited to 'tests/utils')
-rw-r--r--tests/utils/config/configInvalid.json.php5
-rw-r--r--tests/utils/config/configJson.json.php34
-rw-r--r--tests/utils/config/configPhp.php14
3 files changed, 53 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..167f2168
--- /dev/null
+++ b/tests/utils/config/configInvalid.json.php
@@ -0,0 +1,5 @@
1<?php /*
2{
3 bad: bad,
4}
5*/ ?> \ No newline at end of file
diff --git a/tests/utils/config/configJson.json.php b/tests/utils/config/configJson.json.php
new file mode 100644
index 00000000..06a302e8
--- /dev/null
+++ b/tests/utils/config/configJson.json.php
@@ -0,0 +1,34 @@
1<?php /*
2{
3 "credentials": {
4 "login":"root",
5 "hash":"hash",
6 "salt":"salt"
7 },
8 "security": {
9 "session_protection_disabled":false
10 },
11 "general": {
12 "timezone":"Europe\/Paris",
13 "title": "Shaarli",
14 "header_link": "?"
15 },
16 "privacy": {
17 "default_private_links":true
18 },
19 "redirector": {
20 "url":"lala"
21 },
22 "config": {
23 "foo": "bar"
24 },
25 "resource": {
26 "datastore": "tests\/utils\/config\/datastore.php",
27 "data_dir": "tests\/utils\/config"
28 },
29 "plugins": {
30 "WALLABAG_VERSION": 1
31 }
32}
33*/ ?>
34
diff --git a/tests/utils/config/configPhp.php b/tests/utils/config/configPhp.php
new file mode 100644
index 00000000..0e034175
--- /dev/null
+++ b/tests/utils/config/configPhp.php
@@ -0,0 +1,14 @@
1<?php
2$GLOBALS['login'] = 'root';
3$GLOBALS['hash'] = 'hash';
4$GLOBALS['salt'] = 'salt';
5$GLOBALS['timezone'] = 'Europe/Paris';
6$GLOBALS['title'] = 'title';
7$GLOBALS['titleLink'] = 'titleLink';
8$GLOBALS['redirector'] = 'lala';
9$GLOBALS['disablesessionprotection'] = false;
10$GLOBALS['privateLinkByDefault'] = false;
11$GLOBALS['config']['DATADIR'] = 'tests/Updater';
12$GLOBALS['config']['PAGECACHE'] = 'sandbox/pagecache';
13$GLOBALS['config']['DATASTORE'] = 'data/datastore.php';
14$GLOBALS['plugins']['WALLABAG_VERSION'] = '1';