‪TYPO3CMS  11.5
CacheManagerTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
23 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
24 
25 class ‪CacheManagerTest extends UnitTestCase
26 {
31  {
32  $rawConfiguration = [
33  'pages' => [
34  'frontend' => VariableFrontend::class,
35  'backend' => Typo3DatabaseBackend::class,
36  'options' => [
37  'compression' => true,
38  ],
39  'groups' => ['pages'],
40  ],
41  'cache_pages' => [
42  'backend' => \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class,
43  'options' => [
44  'hostname' => 'redis',
45  ],
46  'groups' => ['pages'],
47  ],
48  ];
49  $expectedConfiguration = [
50  'pages' => [
51  'frontend' => VariableFrontend::class,
52  'backend' => \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class,
53  'options' => [
54  'compression' => true,
55  'hostname' => 'redis',
56  ],
57  'groups' => ['pages'],
58  ],
59  ];
60 
61  $manager = $this->getAccessibleMock(CacheManager::class, ['dummy']);
62  $manager->setCacheConfigurations($rawConfiguration);
63  self::assertEquals($expectedConfiguration, $manager->_get('cacheConfigurations'));
64  }
65 }
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Cache\CacheManagerTest\setCacheConfigurationsMergesLegacyConfigCorrectly
‪setCacheConfigurationsMergesLegacyConfigCorrectly()
Definition: CacheManagerTest.php:30
‪TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend
Definition: Typo3DatabaseBackend.php:30
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Cache
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Cache\CacheManagerTest
Definition: CacheManagerTest.php:26
‪TYPO3\CMS\Core\Cache\Frontend\VariableFrontend
Definition: VariableFrontend.php:25
‪TYPO3\CMS\Core\Cache\CacheManager
Definition: CacheManager.php:36