aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/config/ConfigJsonTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/config/ConfigJsonTest.php')
-rw-r--r--tests/config/ConfigJsonTest.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/config/ConfigJsonTest.php b/tests/config/ConfigJsonTest.php
index 0960c729..359e9112 100644
--- a/tests/config/ConfigJsonTest.php
+++ b/tests/config/ConfigJsonTest.php
@@ -24,8 +24,8 @@ class ConfigJsonTest extends PHPUnit_Framework_TestCase
24 { 24 {
25 $conf = $this->configIO->read('tests/utils/config/configJson.json.php'); 25 $conf = $this->configIO->read('tests/utils/config/configJson.json.php');
26 $this->assertEquals('root', $conf['credentials']['login']); 26 $this->assertEquals('root', $conf['credentials']['login']);
27 $this->assertEquals('lala', $conf['extras']['redirector']); 27 $this->assertEquals('lala', $conf['redirector']['url']);
28 $this->assertEquals('tests/utils/config/datastore.php', $conf['path']['datastore']); 28 $this->assertEquals('tests/utils/config/datastore.php', $conf['resource']['datastore']);
29 $this->assertEquals('1', $conf['plugins']['WALLABAG_VERSION']); 29 $this->assertEquals('1', $conf['plugins']['WALLABAG_VERSION']);
30 } 30 }
31 31
@@ -58,11 +58,11 @@ class ConfigJsonTest extends PHPUnit_Framework_TestCase
58 'credentials' => array( 58 'credentials' => array(
59 'login' => 'root', 59 'login' => 'root',
60 ), 60 ),
61 'path' => array( 61 'resource' => array(
62 'datastore' => 'data/datastore.php', 62 'datastore' => 'data/datastore.php',
63 ), 63 ),
64 'extras' => array( 64 'redirector' => array(
65 'redirector' => 'lala', 65 'url' => 'lala',
66 ), 66 ),
67 'plugins' => array( 67 'plugins' => array(
68 'WALLABAG_VERSION' => '1', 68 'WALLABAG_VERSION' => '1',
@@ -75,18 +75,18 @@ class ConfigJsonTest extends PHPUnit_Framework_TestCase
75 "credentials": { 75 "credentials": {
76 "login": "root" 76 "login": "root"
77 }, 77 },
78 "path": { 78 "resource": {
79 "datastore": "data\/datastore.php" 79 "datastore": "data\/datastore.php"
80 }, 80 },
81 "extras": { 81 "redirector": {
82 "redirector": "lala" 82 "url": "lala"
83 }, 83 },
84 "plugins": { 84 "plugins": {
85 "WALLABAG_VERSION": "1" 85 "WALLABAG_VERSION": "1"
86 } 86 }
87}'; 87}';
88 } else { 88 } else {
89 $expected = '{"credentials":{"login":"root"},"path":{"datastore":"data\/datastore.php"},"extras":{"redirector":"lala"},"plugins":{"WALLABAG_VERSION":"1"}}'; 89 $expected = '{"credentials":{"login":"root"},"resource":{"datastore":"data\/datastore.php"},"redirector":{"url":"lala"},"plugins":{"WALLABAG_VERSION":"1"}}';
90 } 90 }
91 $expected = ConfigJson::getPhpHeaders() . $expected; 91 $expected = ConfigJson::getPhpHeaders() . $expected;
92 $this->assertEquals($expected, file_get_contents($dataFile)); 92 $this->assertEquals($expected, file_get_contents($dataFile));
@@ -102,10 +102,10 @@ class ConfigJsonTest extends PHPUnit_Framework_TestCase
102 $dest = 'tests/utils/config/configOverwrite.json.php'; 102 $dest = 'tests/utils/config/configOverwrite.json.php';
103 copy($source, $dest); 103 copy($source, $dest);
104 $conf = $this->configIO->read($dest); 104 $conf = $this->configIO->read($dest);
105 $conf['extras']['redirector'] = 'blabla'; 105 $conf['redirector']['url'] = 'blabla';
106 $this->configIO->write($dest, $conf); 106 $this->configIO->write($dest, $conf);
107 $conf = $this->configIO->read($dest); 107 $conf = $this->configIO->read($dest);
108 $this->assertEquals('blabla', $conf['extras']['redirector']); 108 $this->assertEquals('blabla', $conf['redirector']['url']);
109 unlink($dest); 109 unlink($dest);
110 } 110 }
111 111