[TASK] Add missing unit tests for SilentConfigurationUpgradeService (4)
[Packages/TYPO3.CMS.git] / typo3 / sysext / install / Tests / Unit / Service / SilentConfigurationUpgradeServiceTest.php
1 <?php
2 namespace TYPO3\CMS\Install\Service;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 use TYPO3\CMS\Install\Controller\Exception\RedirectException;
18
19 /**
20 * Test case
21 */
22 class SilentConfigurationUpgradeServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
23
24 /**
25 * @var \TYPO3\CMS\Core\Configuration\ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject
26 */
27 protected $configurationManager;
28
29 /**
30 * @param array $methods
31 */
32 protected function createConfigurationManagerWithMockedMethods(array $methods) {
33 $this->configurationManager = $this->getMock(
34 \TYPO3\CMS\Core\Configuration\ConfigurationManager::class,
35 $methods
36 );
37 }
38
39 /**
40 * @test
41 */
42 public function removeObsoleteLocalConfigurationSettingsIfThereAreOldSettings() {
43 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
44 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
45 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
46 array('dummy'),
47 array(),
48 '',
49 FALSE
50 );
51
52 $obsoleteLocalConfigurationSettings = array(
53 'SYS/form_enctype',
54 );
55
56 $currentLocalConfiguration = array(
57 array($obsoleteLocalConfigurationSettings, TRUE)
58 );
59 $this->createConfigurationManagerWithMockedMethods(
60 array(
61 'removeLocalConfigurationKeysByPath',
62 )
63 );
64 $this->configurationManager->expects($this->exactly(1))
65 ->method('removeLocalConfigurationKeysByPath')
66 ->will($this->returnValueMap($currentLocalConfiguration));
67
68 $this->setExpectedException(\TYPO3\CMS\Install\Controller\Exception\RedirectException::class);
69
70 $silentConfigurationUpgradeServiceInstance->_set('obsoleteLocalConfigurationSettings', $obsoleteLocalConfigurationSettings);
71 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
72
73 $silentConfigurationUpgradeServiceInstance->_call('removeObsoleteLocalConfigurationSettings');
74 }
75
76 /**
77 * @test
78 */
79 public function doNotRemoveObsoleteLocalConfigurationSettingsIfThereAreNoOldSettings() {
80 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
81 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
82 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
83 array('dummy'),
84 array(),
85 '',
86 FALSE
87 );
88
89 $obsoleteLocalConfigurationSettings = array(
90 'SYS/form_enctype',
91 );
92
93 $currentLocalConfiguration = array(
94 array($obsoleteLocalConfigurationSettings, FALSE)
95 );
96 $this->createConfigurationManagerWithMockedMethods(
97 array(
98 'removeLocalConfigurationKeysByPath',
99 )
100 );
101 $this->configurationManager->expects($this->exactly(1))
102 ->method('removeLocalConfigurationKeysByPath')
103 ->will($this->returnValueMap($currentLocalConfiguration));
104
105 $silentConfigurationUpgradeServiceInstance->_set('obsoleteLocalConfigurationSettings', $obsoleteLocalConfigurationSettings);
106 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
107
108 $silentConfigurationUpgradeServiceInstance->_call('removeObsoleteLocalConfigurationSettings');
109 }
110
111 /**
112 * @test
113 */
114 public function configureSaltedPasswordsWithDefaultConfiguration() {
115 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
116 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
117 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
118 array('dummy'),
119 array(),
120 '',
121 FALSE
122 );
123 $config = 'a:2:{s:3:"BE.";a:3:{s:11:"forceSalted";i:0;s:15:"onlyAuthService";i:0;s:12:"updatePasswd";i:1;}s:3:"FE.";a:4:{s:7:"enabled";i:0;s:11:"forceSalted";i:0;s:15:"onlyAuthService";i:0;s:12:"updatePasswd";i:1;}}';
124 $defaultConfiguration = array();
125 $defaultConfiguration['EXT']['extConf']['saltedpasswords'] = $config;
126
127 $closure = function () {
128 throw new \RuntimeException('Path does not exist in array', 1341397869);
129 };
130
131 $this->createConfigurationManagerWithMockedMethods(
132 array(
133 'getDefaultConfiguration',
134 'getLocalConfigurationValueByPath',
135 'setLocalConfigurationValueByPath',
136 )
137 );
138 $this->configurationManager->expects($this->exactly(1))
139 ->method('getDefaultConfiguration')
140 ->will($this->returnValue($defaultConfiguration));
141 $this->configurationManager->expects($this->exactly(1))
142 ->method('getLocalConfigurationValueByPath')
143 ->will($this->returnCallback($closure));
144 $this->configurationManager->expects($this->once())
145 ->method('setLocalConfigurationValueByPath')
146 ->with($this->equalTo('EXT/extConf/saltedpasswords'), $this->equalTo($config));
147
148 $this->setExpectedException(\TYPO3\CMS\Install\Controller\Exception\RedirectException::class);
149
150 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
151
152 $silentConfigurationUpgradeServiceInstance->_call('configureSaltedPasswords');
153 }
154
155 /**
156 * @test
157 */
158 public function configureSaltedPasswordsWithExtensionConfigurationBeEnabled() {
159 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
160 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
161 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
162 array('dummy'),
163 array(),
164 '',
165 FALSE
166 );
167 $config = 'a:2:{s:3:"BE.";a:1:{s:21:"saltedPWHashingMethod";}s:3:"FE.";a:2:{s:7:"enabled";i:0;s:11:"forceSalted";i:0;}}';
168 $defaultConfiguration = array();
169 $defaultConfiguration['EXT']['extConf']['saltedpasswords'] = $config;
170
171 $currentLocalConfiguration = array(
172 array('EXT/extConf/saltedpasswords', 'a:2:{s:3:"BE.";a:1:{s:7:"enabled";i:1;}s:3:"FE.";a:1:{s:7:"enabled";i:0;}}')
173 );
174 $newConfig = 'a:2:{s:3:"BE.";a:0:{}s:3:"FE.";a:1:{s:7:"enabled";i:0;}}';
175 $this->createConfigurationManagerWithMockedMethods(
176 array(
177 'getDefaultConfiguration',
178 'getLocalConfigurationValueByPath',
179 'setLocalConfigurationValueByPath',
180 )
181 );
182 $this->configurationManager->expects($this->exactly(1))
183 ->method('getDefaultConfiguration')
184 ->will($this->returnValue($defaultConfiguration));
185 $this->configurationManager->expects($this->exactly(1))
186 ->method('getLocalConfigurationValueByPath')
187 ->will($this->returnValueMap($currentLocalConfiguration));
188 $this->configurationManager->expects($this->once())
189 ->method('setLocalConfigurationValueByPath')
190 ->with($this->equalTo('EXT/extConf/saltedpasswords'), $this->equalTo($newConfig));
191
192 $this->setExpectedException(\TYPO3\CMS\Install\Controller\Exception\RedirectException::class);
193
194 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
195
196 $silentConfigurationUpgradeServiceInstance->_call('configureSaltedPasswords');
197 }
198
199 /**
200 * @test
201 */
202 public function configureSaltedPasswordsWithExtensionConfigurationBeNotEnabled() {
203 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
204 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
205 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
206 array('dummy'),
207 array(),
208 '',
209 FALSE
210 );
211 $config = 'a:2:{s:3:"BE.";a:1:{s:15:"onlyAuthService";i:0;}s:3:"FE.";a:2:{s:7:"enabled";i:0;s:11:"forceSalted";i:0;}}';
212 $defaultConfiguration = array();
213 $defaultConfiguration['EXT']['extConf']['saltedpasswords'] = $config;
214
215 $currentLocalConfiguration = array(
216 array('EXT/extConf/saltedpasswords', 'a:2:{s:3:"BE.";a:2:{s:7:"enabled";i:0;s:12:"updatePasswd";i:1;}s:3:"FE.";a:1:{s:7:"enabled";i:0;}}')
217 );
218 $newConfig = 'a:2:{s:3:"BE.";a:1:{s:15:"onlyAuthService";i:0;}s:3:"FE.";a:1:{s:7:"enabled";i:0;}}';
219 $this->createConfigurationManagerWithMockedMethods(
220 array(
221 'getDefaultConfiguration',
222 'getLocalConfigurationValueByPath',
223 'setLocalConfigurationValueByPath',
224 )
225 );
226 $this->configurationManager->expects($this->exactly(1))
227 ->method('getDefaultConfiguration')
228 ->will($this->returnValue($defaultConfiguration));
229 $this->configurationManager->expects($this->exactly(1))
230 ->method('getLocalConfigurationValueByPath')
231 ->will($this->returnValueMap($currentLocalConfiguration));
232 $this->configurationManager->expects($this->once())
233 ->method('setLocalConfigurationValueByPath')
234 ->with($this->equalTo('EXT/extConf/saltedpasswords'), $this->equalTo($newConfig));
235
236 $this->setExpectedException(\TYPO3\CMS\Install\Controller\Exception\RedirectException::class);
237
238 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
239
240 $silentConfigurationUpgradeServiceInstance->_call('configureSaltedPasswords');
241 }
242
243 /**
244 * @test
245 */
246 public function noProxyAuthSchemeSetInLocalConfiguration() {
247 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
248 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
249 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
250 array('dummy'),
251 array(),
252 '',
253 FALSE
254 );
255
256 $closure = function ($param) {
257 throw new \RuntimeException('Path does not exist in array', 1341397869);
258 };
259
260 $this->createConfigurationManagerWithMockedMethods(
261 array(
262 'getLocalConfigurationValueByPath',
263 'removeLocalConfigurationKeysByPath',
264 )
265 );
266 $this->configurationManager->expects($this->exactly(1))
267 ->method('getLocalConfigurationValueByPath')
268 ->will($this->returnCallback($closure));
269 $this->configurationManager->expects($this->never())
270 ->method('removeLocalConfigurationKeysByPath');
271
272 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
273
274 $silentConfigurationUpgradeServiceInstance->_call('setProxyAuthScheme');
275 }
276
277 /**
278 * @test
279 */
280 public function proxyAuthSchemeIsDigest() {
281 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
282 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
283 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
284 array('dummy'),
285 array(),
286 '',
287 FALSE
288 );
289
290 $currentLocalConfiguration = array(
291 array('HTTP/proxy_auth_scheme', 'digest')
292 );
293
294 $this->createConfigurationManagerWithMockedMethods(
295 array(
296 'getLocalConfigurationValueByPath',
297 'removeLocalConfigurationKeysByPath',
298 )
299 );
300 $this->configurationManager->expects($this->exactly(1))
301 ->method('getLocalConfigurationValueByPath')
302 ->will($this->returnValueMap($currentLocalConfiguration));
303 $this->configurationManager->expects($this->never())
304 ->method('removeLocalConfigurationKeysByPath');
305
306 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
307
308 $silentConfigurationUpgradeServiceInstance->_call('setProxyAuthScheme');
309 }
310
311 /**
312 * @test
313 */
314 public function proxyAuthSchemeIsBasic() {
315 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
316 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
317 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
318 array('dummy'),
319 array(),
320 '',
321 FALSE
322 );
323
324 $currentLocalConfiguration = array(
325 array('HTTP/proxy_auth_scheme', 'basic')
326 );
327
328 $this->createConfigurationManagerWithMockedMethods(
329 array(
330 'getLocalConfigurationValueByPath',
331 'removeLocalConfigurationKeysByPath',
332 )
333 );
334 $this->configurationManager->expects($this->exactly(1))
335 ->method('getLocalConfigurationValueByPath')
336 ->will($this->returnValueMap($currentLocalConfiguration));
337 $this->configurationManager->expects($this->once())
338 ->method('removeLocalConfigurationKeysByPath')
339 ->with($this->equalTo(array('HTTP/proxy_auth_scheme')));
340
341 $this->setExpectedException(\TYPO3\CMS\Install\Controller\Exception\RedirectException::class);
342
343 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
344
345 $silentConfigurationUpgradeServiceInstance->_call('setProxyAuthScheme');
346 }
347
348 /**
349 * @test
350 */
351 public function doNotGenerateEncryptionKeyIfExists() {
352 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
353 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
354 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
355 array('dummy'),
356 array(),
357 '',
358 FALSE
359 );
360
361 $currentLocalConfiguration = array(
362 array('SYS/encryptionKey', 'EnCrYpTiOnKeY')
363 );
364
365 $this->createConfigurationManagerWithMockedMethods(
366 array(
367 'getLocalConfigurationValueByPath',
368 'setLocalConfigurationValueByPath',
369 )
370 );
371 $this->configurationManager->expects($this->exactly(1))
372 ->method('getLocalConfigurationValueByPath')
373 ->will($this->returnValueMap($currentLocalConfiguration));
374 $this->configurationManager->expects($this->never())
375 ->method('setLocalConfigurationValueByPath');
376
377 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
378
379 $silentConfigurationUpgradeServiceInstance->_call('generateEncryptionKeyIfNeeded');
380 }
381
382 /**
383 * @test
384 */
385 public function generateEncryptionKeyIfNotExists() {
386 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
387 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
388 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
389 array('dummy'),
390 array(),
391 '',
392 FALSE
393 );
394
395 $closure = function () {
396 throw new \RuntimeException('Path does not exist in array', 1341397869);
397 };
398
399 $this->createConfigurationManagerWithMockedMethods(
400 array(
401 'getLocalConfigurationValueByPath',
402 'setLocalConfigurationValueByPath',
403 )
404 );
405 $this->configurationManager->expects($this->exactly(1))
406 ->method('getLocalConfigurationValueByPath')
407 ->will($this->returnCallback($closure));
408 $this->configurationManager->expects($this->once())
409 ->method('setLocalConfigurationValueByPath')
410 ->with($this->equalTo('SYS/encryptionKey'), $this->isType('string'));
411
412 $this->setExpectedException(\TYPO3\CMS\Install\Controller\Exception\RedirectException::class);
413
414 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
415
416 $silentConfigurationUpgradeServiceInstance->_call('generateEncryptionKeyIfNeeded');
417 }
418
419 /**
420 * Dataprovider for transferDeprecatedCurlSettings
421 *
422 * @return array
423 */
424 public function curlProxySettingsToHttpSettingsMapping() {
425 return array(
426 array('http://proxy:3128/', 'proxy', '3128'),
427 array('http://proxy:3128', 'proxy', '3128'),
428 array('proxy:3128', 'proxy', '3128'),
429 array('https://proxy:3128/', 'proxy', '3128'),
430 );
431 }
432
433 /**
434 * @test
435 * @dataProvider curlProxySettingsToHttpSettingsMapping
436 */
437 public function transferDeprecatedCurlSettings($curlProxyServer, $proxyHost, $proxyPort) {
438 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
439 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
440 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
441 array('dummy'),
442 array(),
443 '',
444 FALSE
445 );
446
447 $currentLocalConfiguration = array(
448 array('SYS/curlProxyServer', $curlProxyServer),
449 array('HTTP/proxy_host', ''),
450 array('SYS/curlProxyUserPass', ''),
451 array('HTTP/proxy_user', ''),
452 array('SYS/curlUse', FALSE)
453 );
454 $this->createConfigurationManagerWithMockedMethods(
455 array(
456 'getLocalConfigurationValueByPath',
457 'setLocalConfigurationValueByPath',
458 'getConfigurationValueByPath'
459 )
460 );
461 $this->configurationManager->expects($this->exactly(5))
462 ->method('getLocalConfigurationValueByPath')
463 ->will($this->returnValueMap($currentLocalConfiguration));
464 $this->configurationManager->expects($this->exactly(2))
465 ->method('setLocalConfigurationValueByPath')
466 ->withConsecutive(
467 array('HTTP/proxy_host', $proxyHost),
468 array('HTTP/proxy_port', $proxyPort)
469 );
470
471 $this->setExpectedException(\TYPO3\CMS\Install\Controller\Exception\RedirectException::class);
472
473 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
474
475 $silentConfigurationUpgradeServiceInstance->_call('transferDeprecatedCurlSettings');
476 }
477
478 /**
479 * @test
480 */
481 public function curlProxyServerDoesNotOverwriteHttpSettings() {
482 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
483 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
484 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
485 array('dummy'),
486 array(),
487 '',
488 FALSE
489 );
490
491 $currentLocalConfiguration = array(
492 array('SYS/curlProxyServer', 'http://proxyOld:3128/'),
493 array('SYS/curlProxyUserPass', 'userOld:passOld'),
494 array('HTTP/proxy_host', 'proxyNew'),
495 array('HTTP/proxy_port', '3128'),
496 array('HTTP/proxy_user', 'userNew'),
497 array('HTTP/proxy_pass', 'passNew'),
498 array('SYS/curlUse', FALSE)
499 );
500 $this->createConfigurationManagerWithMockedMethods(
501 array(
502 'getLocalConfigurationValueByPath',
503 'setLocalConfigurationValueByPath',
504 'getConfigurationValueByPath'
505 )
506 );
507 $this->configurationManager->expects($this->exactly(5))
508 ->method('getLocalConfigurationValueByPath')
509 ->will($this->returnValueMap($currentLocalConfiguration));
510 $this->configurationManager->expects($this->never())
511 ->method('setLocalConfigurationValueByPath');
512
513 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
514
515 $silentConfigurationUpgradeServiceInstance->_call('transferDeprecatedCurlSettings');
516 }
517
518 /**
519 * @test
520 */
521 public function curlAdapterUsedIfCurlUse() {
522 /** @var $silentConfigurationUpgradeServiceInstance \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
523 $silentConfigurationUpgradeServiceInstance = $this->getAccessibleMock(
524 \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::class,
525 array('dummy'),
526 array(),
527 '',
528 FALSE
529 );
530
531 $currentLocalConfiguration = array(
532 array('SYS/curlProxyServer', ''),
533 array('SYS/curlProxyUserPass', ''),
534 array('HTTP/proxy_host', 'proxyNew'),
535 array('HTTP/proxy_user', 'userNew'),
536 array('SYS/curlUse', TRUE)
537 );
538 $this->createConfigurationManagerWithMockedMethods(
539 array(
540 'getLocalConfigurationValueByPath',
541 'getConfigurationValueByPath',
542 'setLocalConfigurationValueByPath',
543 )
544 );
545 $this->configurationManager->expects($this->exactly(5))
546 ->method('getLocalConfigurationValueByPath')
547 ->will($this->returnValueMap($currentLocalConfiguration));
548 $this->configurationManager->expects($this->once())
549 ->method('setLocalConfigurationValueByPath')
550 ->withConsecutive(
551 array('HTTP/adapter', 'curl')
552 );
553
554 $this->setExpectedException(\TYPO3\CMS\Install\Controller\Exception\RedirectException::class);
555
556 $silentConfigurationUpgradeServiceInstance->_set('configurationManager', $this->configurationManager);
557
558 $silentConfigurationUpgradeServiceInstance->_call('transferDeprecatedCurlSettings');
559 }
560
561 }