diff options
Diffstat (limited to 'tests/ConfigTest.php')
-rw-r--r-- | tests/ConfigTest.php | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index 492ddd3b..7200aae6 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php | |||
@@ -134,48 +134,6 @@ class ConfigTest extends PHPUnit_Framework_TestCase | |||
134 | } | 134 | } |
135 | 135 | ||
136 | /** | 136 | /** |
137 | * Test mergeDeprecatedConfig while being logged in: | ||
138 | * 1. init a config file. | ||
139 | * 2. init a options.php file with update value. | ||
140 | * 3. merge. | ||
141 | * 4. check updated value in config file. | ||
142 | */ | ||
143 | public function testMergeDeprecatedConfig() | ||
144 | { | ||
145 | // init | ||
146 | writeConfig(self::$configFields, true); | ||
147 | $configCopy = self::$configFields; | ||
148 | $invert = !$configCopy['privateLinkByDefault']; | ||
149 | $configCopy['privateLinkByDefault'] = $invert; | ||
150 | |||
151 | // Use writeConfig to create a options.php | ||
152 | $configCopy['config']['CONFIG_FILE'] = 'tests/options.php'; | ||
153 | writeConfig($configCopy, true); | ||
154 | |||
155 | $this->assertTrue(is_file($configCopy['config']['CONFIG_FILE'])); | ||
156 | |||
157 | // merge configs | ||
158 | mergeDeprecatedConfig(self::$configFields, true); | ||
159 | |||
160 | // make sure updated field is changed | ||
161 | include self::$configFields['config']['CONFIG_FILE']; | ||
162 | $this->assertEquals($invert, $GLOBALS['privateLinkByDefault']); | ||
163 | $this->assertFalse(is_file($configCopy['config']['CONFIG_FILE'])); | ||
164 | } | ||
165 | |||
166 | /** | ||
167 | * Test mergeDeprecatedConfig while being logged in without options file. | ||
168 | */ | ||
169 | public function testMergeDeprecatedConfigNoFile() | ||
170 | { | ||
171 | writeConfig(self::$configFields, true); | ||
172 | mergeDeprecatedConfig(self::$configFields, true); | ||
173 | |||
174 | include self::$configFields['config']['CONFIG_FILE']; | ||
175 | $this->assertEquals(self::$configFields['login'], $GLOBALS['login']); | ||
176 | } | ||
177 | |||
178 | /** | ||
179 | * Test save_plugin_config with valid data. | 137 | * Test save_plugin_config with valid data. |
180 | * | 138 | * |
181 | * @throws PluginConfigOrderException | 139 | * @throws PluginConfigOrderException |