From 506c7767aeb5421f84a09b34cdb9fba7e01be14e Mon Sep 17 00:00:00 2001 From: Hannes Bochmann Date: Mon, 11 Mar 2024 12:40:23 +0100 Subject: [PATCH] Cleanup fix tests --- Tests/Unit/Cache/VarnishBackendTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tests/Unit/Cache/VarnishBackendTest.php b/Tests/Unit/Cache/VarnishBackendTest.php index 3e4c906..399ca81 100644 --- a/Tests/Unit/Cache/VarnishBackendTest.php +++ b/Tests/Unit/Cache/VarnishBackendTest.php @@ -50,12 +50,19 @@ class VarnishBackendTest extends UnitTestCase */ private $extConfBackup = []; + /** + * @var string|null + */ + private $encryptionKeyBackup; + protected bool $resetSingletonInstances = true; protected function setUp(): void { $this->siteNameBackup = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']; $this->extConfBackup = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['mkvarnish'] ?? []; + $this->encryptionKeyBackup = $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] ?? []; + $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = 'test'; parent::setUp(); } @@ -63,6 +70,7 @@ protected function tearDown(): void { $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] = $this->siteNameBackup; $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['mkvarnish'] = $this->extConfBackup; + $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = $this->encryptionKeyBackup; parent::tearDown(); }