Skip to content

Commit

Permalink
Cleanup fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbochmann committed Mar 11, 2024
1 parent 56d10ea commit 506c776
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Tests/Unit/Cache/VarnishBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,27 @@ 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();
}

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();
}

Expand Down

0 comments on commit 506c776

Please sign in to comment.