From d7ef60a1c551fac3075489319d91cbc212972672 Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Thu, 19 Dec 2024 07:15:18 +0100 Subject: [PATCH] [TASK] content_defender tests v12 --- .../Datahandler/ContentDefender/AbstractContentDefender.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Tests/Functional/Datahandler/ContentDefender/AbstractContentDefender.php b/Tests/Functional/Datahandler/ContentDefender/AbstractContentDefender.php index 607a8904..eb0001cc 100644 --- a/Tests/Functional/Datahandler/ContentDefender/AbstractContentDefender.php +++ b/Tests/Functional/Datahandler/ContentDefender/AbstractContentDefender.php @@ -23,10 +23,7 @@ abstract class AbstractContentDefender extends AbstractDatahandler protected function setUp(): void { parent::setUp(); - if ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() === 12) { - // content_defender calls FormDataCompiler which wants access global variable TYPO3_REQUEST - $GLOBALS['TYPO3_REQUEST'] = null; - } elseif ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() > 12) { + if ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() > 12) { // content_defender always returns true for restrictions if global variable TYPO3_REQUEST is null $GLOBALS['TYPO3_REQUEST'] = (new ServerRequest())->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_BE); }