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 4d4c9b8 commit 042dae4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Tests/Unit/Middleware/AuthResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class AuthResolverTest extends UnitTestCase
{
protected bool $resetSingletonInstances = true;

protected ?string $encryptionKeyBackup;

protected function setUp(): void
{
parent::setUp();
Expand All @@ -43,6 +45,15 @@ protected function setUp(): void
GeneralUtility::makeInstance(Context::class)
->setAspect('security', GeneralUtility::makeInstance(SecurityAspect::class));
}

$this->encryptionKeyBackup = $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] ?? [];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = 'test';
}

protected function tearDown(): void
{
$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = $this->encryptionKeyBackup;
parent::tearDown();
}

/**
Expand Down

0 comments on commit 042dae4

Please sign in to comment.