From f664b8b1ba8cf598c5212f9373f22aaf6f1ffe65 Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Mon, 16 Mar 2026 13:57:13 +0100 Subject: [PATCH 1/2] [FEATURE] add ContentAreaProcessor for TYPO3 v14 f:render.contentArea --- .../DataProcessing/ContentAreaProcessor.php | 121 ++++++++++++++++++ Classes/Tca/Registry.php | 13 ++ .../Frontend/DefaultLanguageTest.php | 28 ++++ .../Fixtures/default_language_ContentArea.csv | 8 ++ 4 files changed, 170 insertions(+) create mode 100644 Classes/DataProcessing/ContentAreaProcessor.php create mode 100644 Tests/Functional/Frontend/Fixtures/default_language_ContentArea.csv diff --git a/Classes/DataProcessing/ContentAreaProcessor.php b/Classes/DataProcessing/ContentAreaProcessor.php new file mode 100644 index 00000000..3171e005 --- /dev/null +++ b/Classes/DataProcessing/ContentAreaProcessor.php @@ -0,0 +1,121 @@ + + * + */ +#[Autoconfigure(public: true)] +readonly class ContentAreaProcessor implements DataProcessorInterface +{ + + public function __construct( + protected ContentDataProcessor $contentDataProcessor, + protected Context $context, + protected FrontendContainerFactory $frontendContainerFactory, + protected Registry $tcaRegistry, + protected RecordFactory $recordFactory, + protected Typo3Version $typo3Version, + protected LoggerInterface $logger, + ) {} + + public function process( + ContentObjectRenderer $cObj, + array $contentObjectConfiguration, + array $processorConfiguration, + array $processedData, + ): array { + if (((float)$this->typo3Version->getBranch()) <= 14.1) { + $this->logger->error(ContentAreaProcessor::class . ' requires TYPO3 v14.2 or higher. Please check your configuration.'); + + return $processedData; + } + + $record = $cObj->data; + + $CType = $record['CType'] ?? ''; + if (!$this->tcaRegistry->isContainerElement($CType)) { + return $processedData; + } + + $columnsColPos = $this->tcaRegistry->getAllAvailableColumnsColPos($CType); + + $container = null; + + $areas = []; + foreach ($columnsColPos as $colPos) { + $areas[$colPos] = new ContentAreaClosure( + function () use (&$container, $CType, $cObj, $record, $colPos): ContentArea { + $container ??= $this->frontendContainerFactory->buildContainer($cObj, $this->context, (int)$record['uid']); + + $contentDefenderConfiguration = $this->tcaRegistry->getContentDefenderConfiguration($CType, $colPos); + + $rows = $container->getChildrenByColPos($colPos); + + $records = array_map(fn($row) => $this->recordFactory->createFromDatabaseRow('tt_content', $row), $rows); + return new ContentArea( + (string)$colPos, + $this->tcaRegistry->getColPosName($record['CType'], $colPos), + $colPos, + ContentSlideMode::None, + GeneralUtility::trimExplode(',', $contentDefenderConfiguration['allowedContentTypes'] ?? '', true), + GeneralUtility::trimExplode(',', $contentDefenderConfiguration['disallowedContentTypes'] ?? '', true), + [ + 'container' => $container, + ], + $records, + ); + }, + ); + } + + $processedData[$processedConfiguration['as'] ?? 'content'] = new ContentAreaCollection($areas); + return $processedData; + } +} diff --git a/Classes/Tca/Registry.php b/Classes/Tca/Registry.php index 4cbe3002..f38c1b8f 100644 --- a/Classes/Tca/Registry.php +++ b/Classes/Tca/Registry.php @@ -232,6 +232,19 @@ public function getContainerLabel(string $cType): string return $GLOBALS['TCA']['tt_content']['containerConfiguration'][$cType]['label'] ?? $cType; } + public function getColPosName(string $cType, int $colPos): ?string + { + $grid = $this->getGrid($cType); + foreach ($grid as $row) { + foreach ($row as $column) { + if ($column['colPos'] === $colPos) { + return (string)$column['name']; + } + } + } + return null; + } + public function getAvailableColumns(string $cType): array { $columns = []; diff --git a/Tests/Functional/Frontend/DefaultLanguageTest.php b/Tests/Functional/Frontend/DefaultLanguageTest.php index 7b0a0e58..0ab829d0 100644 --- a/Tests/Functional/Frontend/DefaultLanguageTest.php +++ b/Tests/Functional/Frontend/DefaultLanguageTest.php @@ -12,6 +12,7 @@ use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\Test; +use TYPO3\CMS\Core\Information\Typo3Version; use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest; class DefaultLanguageTest extends AbstractFrontend @@ -39,6 +40,33 @@ public function childrenAreRendered(): void self::assertStringContainsString('

left-side-default

', $body); } + #[Test] + #[Group('frontend')] + public function childrenAreRenderedContentArea(): void + { + if (((float)(new Typo3Version())->getBranch()) < 14.2) { + $this->markTestSkipped('Content area rendering is only supported in TYPO3 v14.2 and above'); + } + + $this->importCSVDataSet(__DIR__ . '/Fixtures/default_language_ContentArea.csv'); + $this->setUpFrontendRootPage( + 1, + [ + 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExample/TypoScript/2ColsContentArea/setup.typoscript', + ], + ] + ); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + // rendered content + self::assertStringContainsString('

left-side-default

', $body); + self::assertStringContainsString('

right-side-default

', $body); + } + #[Test] #[Group('frontend')] public function childrenAreRenderedAsSorted(): void diff --git a/Tests/Functional/Frontend/Fixtures/default_language_ContentArea.csv b/Tests/Functional/Frontend/Fixtures/default_language_ContentArea.csv new file mode 100644 index 00000000..bde8fa79 --- /dev/null +++ b/Tests/Functional/Frontend/Fixtures/default_language_ContentArea.csv @@ -0,0 +1,8 @@ +"pages" +,"uid","pid","title","slug" +,1,0,"page-1","/" +"tt_content" +,"uid","pid","CType","header","sorting","sys_language_uid","colPos","tx_container_parent" +,1,1,"b13-2cols-content-area","container-default",256,0,, +,2,1,"header","left-side-default",128,0,200,1 +,3,1,"header","right-side-default",64,0,201,1 From 28e76cf1c43e25678c49cf40962bae9512499cd7 Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Wed, 13 May 2026 22:14:55 +0200 Subject: [PATCH 2/2] [TASK] integrate ContentAreaProcessor * add Tests * add Documentation * improve ContentAreaProcessor * make CI happy --- Build/phpstan13.neon | 4 +- .../DataProcessing/ContentAreaProcessor.php | 37 +++-- Configuration/Services.yaml | 5 +- README.md | 41 ++++++ .../ContentArea/DefaultLanguageTest.php | 90 ++++++++++++ .../ContentArea/LanguageFallbackTest.php | 127 ++++++++++++++++ .../ContentArea/LanguageStrictTest.php | 114 +++++++++++++++ .../ContentArea/SiteLanguageFreeTest.php | 47 ++++++ .../Frontend/ContentArea/WorkspaceTest.php | 138 ++++++++++++++++++ .../Frontend/DataProcessorWithDataTest.php | 2 +- .../Frontend/DataProcessorWithFilesTest.php | 2 +- .../Frontend/DataProcessorWithIrreTest.php | 1 + .../Frontend/DefaultLanguageTest.php | 36 +---- .../Fixtures/ContainerWithTwoChildren.csv | 8 +- .../Templates/ContainerWithTwoChildren.html | 15 +- .../container_from_other_page.typoscript | 6 +- .../Fixtures/TypoScript/setup.typoscript | 1 - ...up_skip_rendering_child_content.typoscript | 2 +- .../Frontend/Fixtures/default_language.csv | 8 +- .../Fixtures/default_language_ContentArea.csv | 8 - .../Frontend/LanguageFallbackTest.php | 5 +- .../Frontend/LanguageStrictTest.php | 5 +- .../Frontend/SiteLanguageFreeTest.php | 5 +- Tests/Functional/Frontend/WorkspaceTest.php | 5 +- 24 files changed, 637 insertions(+), 75 deletions(-) create mode 100644 Tests/Functional/Frontend/ContentArea/DefaultLanguageTest.php create mode 100644 Tests/Functional/Frontend/ContentArea/LanguageFallbackTest.php create mode 100644 Tests/Functional/Frontend/ContentArea/LanguageStrictTest.php create mode 100644 Tests/Functional/Frontend/ContentArea/SiteLanguageFreeTest.php create mode 100644 Tests/Functional/Frontend/ContentArea/WorkspaceTest.php delete mode 100644 Tests/Functional/Frontend/Fixtures/default_language_ContentArea.csv diff --git a/Build/phpstan13.neon b/Build/phpstan13.neon index 11670234..4ab3f99c 100644 --- a/Build/phpstan13.neon +++ b/Build/phpstan13.neon @@ -12,5 +12,5 @@ parameters: - %currentWorkingDirectory%/Classes/Listener/PageContentPreviewRendering.php - %currentWorkingDirectory%/Classes/Listener/ManipulateBackendLayoutColPosConfigurationForPage.php - %currentWorkingDirectory%/Classes/Hooks/Datahandler/ContentElementRestriction - - %currentWorkingDirectory%/Classes/Listener/IsReferenceConsideredForDependency.php - + - %currentWorkingDirectory%/Classes/DataProcessing/ContentAreaProcessor.php + - %currentWorkingDirectory%/Classes/Listener/IsReferenceConsideredForDependency.php \ No newline at end of file diff --git a/Classes/DataProcessing/ContentAreaProcessor.php b/Classes/DataProcessing/ContentAreaProcessor.php index 3171e005..f189938a 100644 --- a/Classes/DataProcessing/ContentAreaProcessor.php +++ b/Classes/DataProcessing/ContentAreaProcessor.php @@ -12,6 +12,7 @@ * of the License, or any later version. */ +use function array_map; use B13\Container\Domain\Factory\FrontendContainerFactory; use B13\Container\Tca\Registry; use Psr\Log\LoggerInterface; @@ -26,9 +27,8 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Frontend\ContentObject\ContentDataProcessor; use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; -use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface; -use function array_map; +use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface; /** * Automatically detects if content element has container columns @@ -49,12 +49,10 @@ * * html: * - * */ #[Autoconfigure(public: true)] readonly class ContentAreaProcessor implements DataProcessorInterface { - public function __construct( protected ContentDataProcessor $contentDataProcessor, protected Context $context, @@ -63,7 +61,8 @@ public function __construct( protected RecordFactory $recordFactory, protected Typo3Version $typo3Version, protected LoggerInterface $logger, - ) {} + ) { + } public function process( ContentObjectRenderer $cObj, @@ -71,13 +70,29 @@ public function process( array $processorConfiguration, array $processedData, ): array { - if (((float)$this->typo3Version->getBranch()) <= 14.1) { - $this->logger->error(ContentAreaProcessor::class . ' requires TYPO3 v14.2 or higher. Please check your configuration.'); - + if ($this->typo3Version->getMajorVersion() < 14) { + $this->logger->error(ContentAreaProcessor::class . ' requires TYPO3 v14 or higher. Please check your configuration.'); return $processedData; } - $record = $cObj->data; + if (isset($processorConfiguration['if.']) && !$cObj->checkIf($processorConfiguration['if.'])) { + return $processedData; + } + $contentId = null; + if ($processorConfiguration['contentId.'] ?? false) { + $contentId = (int)$cObj->stdWrap($processorConfiguration['contentId'] ?? '', $processorConfiguration['contentId.']); + } elseif ($processorConfiguration['contentId'] ?? false) { + $contentId = (int)$processorConfiguration['contentId']; + } + if ($contentId !== null) { + $records = $cObj->getRecords('tt_content', ['uidInList' => $contentId, 'pidInList' => 0]); + if (empty($records)) { + return $processedData; + } + $record = $records[0]; + } else { + $record = $cObj->data; + } $CType = $record['CType'] ?? ''; if (!$this->tcaRegistry->isContainerElement($CType)) { @@ -98,7 +113,7 @@ function () use (&$container, $CType, $cObj, $record, $colPos): ContentArea { $rows = $container->getChildrenByColPos($colPos); - $records = array_map(fn($row) => $this->recordFactory->createFromDatabaseRow('tt_content', $row), $rows); + $records = array_map(fn ($row) => $this->recordFactory->createFromDatabaseRow('tt_content', $row), $rows); return new ContentArea( (string)$colPos, $this->tcaRegistry->getColPosName($record['CType'], $colPos), @@ -115,7 +130,7 @@ function () use (&$container, $CType, $cObj, $record, $colPos): ContentArea { ); } - $processedData[$processedConfiguration['as'] ?? 'content'] = new ContentAreaCollection($areas); + $processedData[$processorConfiguration['as'] ?? 'content'] = (new ContentAreaCollection($areas))->withRequest($cObj->getRequest()); return $processedData; } } diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml index bde54796..1d38b620 100644 --- a/Configuration/Services.yaml +++ b/Configuration/Services.yaml @@ -16,4 +16,7 @@ services: B13\Container\DataProcessing\ContainerProcessor: tags: - - { name: 'data.processor', identifier: 'container' } \ No newline at end of file + - { name: 'data.processor', identifier: 'container' } + B13\Container\DataProcessing\ContentAreaProcessor: + tags: + - { name: 'data.processor', identifier: 'container-content-area' } \ No newline at end of file diff --git a/README.md b/README.md index fb0c27f3..35a4e6cf 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,47 @@ The HTML template file goes in the folder you defined in your TypoScript above ( With explicit colPos defined use `{children_200|201}` as set in the example above +## ContentAreaProcessor for TYPO3 v14 or above + +for TYPO3 v14 or higher you can use the ConentAreaProcessor +Automatically detects if content element has container columns +adds them lazily to the content variable. +The ContentArea can be used in f:render.contentArea or f:render.record ViewHelper + + +### TypoScript + + tt_content.b13-2cols-with-header-container < lib.contentElement + tt_content.b13-2cols-with-header-container { + templateName = 2ColsWithHeader + templateRootPaths { + 10 = EXT:container_example/Resources/Private/Templates + } + dataProcessing { + 100 = B13\Container\DataProcessing\ContentAreaProcessor + } + } + +### Options for ContentAreaProcessor + +| Option | Description | Default | Parameter | +|-----------------------------|-----------------------------------|-------------------------------------------------------|-------------| +| `contentId` | id of container to to process | current uid of content element ``$cObj->data['uid']`` | ``?int`` | +| `as` | variable to use for proceesedData | ``content`` | ``?string`` | + +### Template + +```html + +
{content.200 -> f:render.contentArea()}
+
+ + + {record -> f:render.record()} + + +``` + ## PSR-14 Events ### BeforeContainerConfigurationIsAppliedEvent diff --git a/Tests/Functional/Frontend/ContentArea/DefaultLanguageTest.php b/Tests/Functional/Frontend/ContentArea/DefaultLanguageTest.php new file mode 100644 index 00000000..5e7e48f1 --- /dev/null +++ b/Tests/Functional/Frontend/ContentArea/DefaultLanguageTest.php @@ -0,0 +1,90 @@ +importCSVDataSet(__DIR__ . '/../Fixtures/default_language.csv'); + $this->setUpFrontendRootPage( + 1, + [ + 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExampleContentArea/setup.typoscript', + ], + ] + ); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + // rendered content + self::assertStringContainsString('

container-default

', $body); + self::assertStringContainsString('

header-default

', $body); + self::assertStringContainsString('

left-side-default

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function childrenAreRenderedAsSorted(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/ContainerWithTwoChildren.csv'); + $this->setUpFrontendRootPage( + 1, + [ + 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExampleContentArea/setup.typoscript', + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/container_with_two_children.typoscript', + ], + ] + ); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('
first child
second child
', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function canRenderContainerFromOtherPage(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/ContainerFromOtherPage.csv'); + $this->setUpFrontendRootPage( + 1, + [ + 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExampleContentArea/setup.typoscript', + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/container_from_other_page.typoscript', + ], + ] + ); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

child

', $body); + } +} diff --git a/Tests/Functional/Frontend/ContentArea/LanguageFallbackTest.php b/Tests/Functional/Frontend/ContentArea/LanguageFallbackTest.php new file mode 100644 index 00000000..8ab4a68c --- /dev/null +++ b/Tests/Functional/Frontend/ContentArea/LanguageFallbackTest.php @@ -0,0 +1,127 @@ +importCSVDataSet(__DIR__ . '/../Fixtures/LanguageFallback/setup.csv'); + $this->setUpFrontendRootPage( + 1, + [ + 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExampleContentArea/setup.typoscript', + ], + ] + ); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function nothingTranslated(): void + { + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/fr')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

container-default

', $body); + self::assertStringNotContainsString('

container-fr

', $body); + self::assertStringContainsString('

header-default

', $body); + self::assertStringNotContainsString('

header-fr

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function bothTranslated(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/LanguageFallback/tt_content_both_translated.csv'); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/fr')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

container-fr

', $body); + self::assertStringNotContainsString('

container-default

', $body); + self::assertStringContainsString('

header-fr

', $body); + self::assertStringNotContainsString('

header-default

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function fallbackForStrictLanguageToOtherTranslationFreeMode(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/LanguageFallback/tt_content_fallback_for_strict_language_to_other_translation_free_mode.csv'); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/ch')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

container-de

', $body); + self::assertStringNotContainsString('

container-default

', $body); + // rendered content + self::assertStringContainsString('

header-de

', $body); + self::assertStringNotContainsString('

header-default

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function bothTranslatedTranslatedChildHidden(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/LanguageFallback/tt_content_both_translated_tranlated_child_hidden.csv'); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/fr')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

container-fr

', $body); + self::assertStringNotContainsString('

container-default

', $body); + self::assertStringNotContainsString('

header-fr

', $body); + self::assertStringContainsString('

header-default

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function childTranslated(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/LanguageFallback/tt_content_child_translated.csv'); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/fr')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

container-default

', $body); + self::assertStringNotContainsString('

container-fr

', $body); + // rendered content + self::assertStringContainsString('

header-fr

', $body); + self::assertStringNotContainsString('

header-default

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function containerTranslated(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/LanguageFallback/tt_content_container_translated.csv'); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/fr')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

container-fr

', $body); + self::assertStringNotContainsString('

container-default

', $body); + // rendered content + self::assertStringNotContainsString('

header-fr

', $body); + self::assertStringContainsString('

header-default

', $body); + } +} diff --git a/Tests/Functional/Frontend/ContentArea/LanguageStrictTest.php b/Tests/Functional/Frontend/ContentArea/LanguageStrictTest.php new file mode 100644 index 00000000..a0028896 --- /dev/null +++ b/Tests/Functional/Frontend/ContentArea/LanguageStrictTest.php @@ -0,0 +1,114 @@ +importCSVDataSet(__DIR__ . '/../Fixtures/LanguageStrict/setup.csv'); + $this->setUpFrontendRootPage( + 1, + [ + 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExampleContentArea/setup.typoscript', + ], + ] + ); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function nothingTranslated(): void + { + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/de')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringNotContainsString('

container-default

', $body); + self::assertStringNotContainsString('

container-de

', $body); + // rendered content + self::assertStringNotContainsString('

header-de

', $body); + self::assertStringNotContainsString('

header-default

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function bothTranslated(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/LanguageStrict/tt_content_both_translated.csv'); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/de')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

container-de

', $body); + self::assertStringNotContainsString('

container-default

', $body); + // rendered content + self::assertStringContainsString('

header-de

', $body); + self::assertStringNotContainsString('

header-default

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function bothTranslatedTranslatedChildHidden(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/LanguageStrict/tt_content_both_translated_tranlated_child_hidden.csv'); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/de')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

container-de

', $body); + self::assertStringNotContainsString('

container-default

', $body); + // rendered content + self::assertStringNotContainsString('

header-de

', $body); + self::assertStringNotContainsString('

header-default

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function childTranslated(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/LanguageStrict/tt_content_child_translated.csv'); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/de')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringNotContainsString('

container-default

', $body); + self::assertStringNotContainsString('

container-de

', $body); + // rendered content + self::assertStringNotContainsString('

header-de

', $body); + self::assertStringNotContainsString('

header-default

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function containerTranslated(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/LanguageStrict/tt_content_container_translated.csv'); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/de')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

container-de

', $body); + self::assertStringNotContainsString('

container-default

', $body); + // rendered content + self::assertStringNotContainsString('

header-de

', $body); + self::assertStringNotContainsString('

header-default

', $body); + } +} diff --git a/Tests/Functional/Frontend/ContentArea/SiteLanguageFreeTest.php b/Tests/Functional/Frontend/ContentArea/SiteLanguageFreeTest.php new file mode 100644 index 00000000..078e93d4 --- /dev/null +++ b/Tests/Functional/Frontend/ContentArea/SiteLanguageFreeTest.php @@ -0,0 +1,47 @@ +importCSVDataSet(__DIR__ . '/../Fixtures/SiteLanguageFree/setup.csv'); + $this->setUpFrontendRootPage( + 1, + [ + 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExampleContentArea/setup.typoscript', + ], + ] + ); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function containerTranslatedInFreeModeSiteConfiguration(): void + { + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/en-free')); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringNotContainsString('

header-default

', $body); + self::assertStringContainsString('

header-translated

', $body); + } +} diff --git a/Tests/Functional/Frontend/ContentArea/WorkspaceTest.php b/Tests/Functional/Frontend/ContentArea/WorkspaceTest.php new file mode 100644 index 00000000..68d0e7ce --- /dev/null +++ b/Tests/Functional/Frontend/ContentArea/WorkspaceTest.php @@ -0,0 +1,138 @@ +importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/setup.csv'); + $this->setUpFrontendRootPage( + 1, + [ + 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExampleContentArea/setup.typoscript', + ], + ] + ); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function childInLiveIsRendered(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/container_with_ws_child.csv'); + $response = $this->executeFrontendRequestWrapper(new InternalRequest()); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

header-live

', $body); + self::assertStringNotContainsString('

header-ws

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function childInWorkspaceIsRendered(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/container_with_ws_child.csv'); + $context = (new InternalRequestContext())->withWorkspaceId(1)->withBackendUserId(1); + $response = $this->executeFrontendRequestWrapper(new InternalRequest(), $context); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

header-ws

', $body); + self::assertStringNotContainsString('

header-live

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function childInWorkspaceIsRenderedIfMovedFromOutsideContainer(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/container_with_ws_child_moved_from_outside.csv'); + $context = (new InternalRequestContext())->withWorkspaceId(1)->withBackendUserId(1); + $response = $this->executeFrontendRequestWrapper(new InternalRequest(), $context); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

header-ws

', $body); + self::assertStringNotContainsString('

header-live

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function childInWorkspaceIsRenderendIfContainerIsMovedToOtherPage(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/other_page.csv'); + $this->importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/container_moved_to_other_page.csv'); + $context = (new InternalRequestContext())->withWorkspaceId(1)->withBackendUserId(1); + $response = $this->executeFrontendRequestWrapper(new InternalRequest(), $context); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

header-ws

', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function containerInWorkspaceIsRenderedWhenLiveVersionIsHidden(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/container_in_ws_whith_hidden_live_version.csv'); + $context = (new InternalRequestContext())->withWorkspaceId(1)->withBackendUserId(1); + $response = $this->executeFrontendRequestWrapper(new InternalRequest(), $context); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('ws-container-header', $body); + self::assertStringContainsString('live-child-header', $body); + self::assertStringNotContainsString('live-container-header', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function childInWorkspaceIsRenderedWhenLiveVersionIsHidden(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/child_in_ws_whith_hidden_live_version.csv'); + $context = (new InternalRequestContext())->withWorkspaceId(1)->withBackendUserId(1); + $response = $this->executeFrontendRequestWrapper(new InternalRequest(), $context); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('live-container-header', $body); + self::assertStringContainsString('ws-child-header', $body); + self::assertStringNotContainsString('live-child-header', $body); + } + + #[Test] + #[Group('frontend')] + #[Group('v14-only')] + public function localizedChildInWorkspaceIsRenderendIfContainerWithLocalizationIsMovedToOtherPage(): void + { + $this->importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/other_page.csv'); + $this->importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/localized_pages.csv'); + $this->importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/container_moved_to_other_page.csv'); + $this->importCSVDataSet(__DIR__ . '/../Fixtures/Workspace/localized_container_moved_to_other_page.csv'); + $context = (new InternalRequestContext())->withWorkspaceId(1)->withBackendUserId(1); + $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/de/'), $context); + $body = (string)$response->getBody(); + $body = $this->prepareContent($body); + self::assertStringContainsString('

header-ws loc

', $body); + } +} diff --git a/Tests/Functional/Frontend/DataProcessorWithDataTest.php b/Tests/Functional/Frontend/DataProcessorWithDataTest.php index 5dc7e722..a49db3e6 100644 --- a/Tests/Functional/Frontend/DataProcessorWithDataTest.php +++ b/Tests/Functional/Frontend/DataProcessorWithDataTest.php @@ -28,7 +28,7 @@ protected function setUp(): void 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], 'setup' => [ 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', - 'EXT:container_example/Configuration/TypoScript/2cols.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExample/setup.typoscript', ], ] ); diff --git a/Tests/Functional/Frontend/DataProcessorWithFilesTest.php b/Tests/Functional/Frontend/DataProcessorWithFilesTest.php index b964f7d5..50895826 100644 --- a/Tests/Functional/Frontend/DataProcessorWithFilesTest.php +++ b/Tests/Functional/Frontend/DataProcessorWithFilesTest.php @@ -28,7 +28,7 @@ protected function setUp(): void 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], 'setup' => [ 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', - 'EXT:container_example/Configuration/TypoScript/2cols.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExample/setup.typoscript', ], ] ); diff --git a/Tests/Functional/Frontend/DataProcessorWithIrreTest.php b/Tests/Functional/Frontend/DataProcessorWithIrreTest.php index 43b05458..d2b5f0a9 100644 --- a/Tests/Functional/Frontend/DataProcessorWithIrreTest.php +++ b/Tests/Functional/Frontend/DataProcessorWithIrreTest.php @@ -26,6 +26,7 @@ public function setUp(): void 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], 'setup' => [ 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExample/setup.typoscript', 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/data_processor_with_irre.typoscript', ], ] diff --git a/Tests/Functional/Frontend/DefaultLanguageTest.php b/Tests/Functional/Frontend/DefaultLanguageTest.php index 0ab829d0..1e062c39 100644 --- a/Tests/Functional/Frontend/DefaultLanguageTest.php +++ b/Tests/Functional/Frontend/DefaultLanguageTest.php @@ -12,7 +12,6 @@ use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\Test; -use TYPO3\CMS\Core\Information\Typo3Version; use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest; class DefaultLanguageTest extends AbstractFrontend @@ -26,7 +25,10 @@ public function childrenAreRendered(): void 1, [ 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], - 'setup' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExample/setup.typoscript', + ], ] ); $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/')); @@ -40,33 +42,6 @@ public function childrenAreRendered(): void self::assertStringContainsString('

left-side-default

', $body); } - #[Test] - #[Group('frontend')] - public function childrenAreRenderedContentArea(): void - { - if (((float)(new Typo3Version())->getBranch()) < 14.2) { - $this->markTestSkipped('Content area rendering is only supported in TYPO3 v14.2 and above'); - } - - $this->importCSVDataSet(__DIR__ . '/Fixtures/default_language_ContentArea.csv'); - $this->setUpFrontendRootPage( - 1, - [ - 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], - 'setup' => [ - 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', - 'EXT:container_example/Configuration/Sets/ContainerExample/TypoScript/2ColsContentArea/setup.typoscript', - ], - ] - ); - $response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/')); - $body = (string)$response->getBody(); - $body = $this->prepareContent($body); - // rendered content - self::assertStringContainsString('

left-side-default

', $body); - self::assertStringContainsString('

right-side-default

', $body); - } - #[Test] #[Group('frontend')] public function childrenAreRenderedAsSorted(): void @@ -78,6 +53,7 @@ public function childrenAreRenderedAsSorted(): void 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], 'setup' => [ 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExample/setup.typoscript', 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/container_with_two_children.typoscript', ], ] @@ -98,6 +74,8 @@ public function canRenderContainerFromOtherPage(): void [ 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExample/setup.typoscript', 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/container_from_other_page.typoscript', ], ] diff --git a/Tests/Functional/Frontend/Fixtures/ContainerWithTwoChildren.csv b/Tests/Functional/Frontend/Fixtures/ContainerWithTwoChildren.csv index 7eb406f7..eac66776 100644 --- a/Tests/Functional/Frontend/Fixtures/ContainerWithTwoChildren.csv +++ b/Tests/Functional/Frontend/Fixtures/ContainerWithTwoChildren.csv @@ -2,8 +2,8 @@ ,"uid","pid","title","slug" ,1,0,"page-1","/" "tt_content" -,"uid","pid","CType","header","sorting","colPos","tx_container_parent" -,"1","1","b13-2cols-with-header-container","container","256","0","0" -,"2","1","header","second child","512","201","1" -,"3","1","header","first child","384","201","1" +,"uid","pid","CType","header","sorting","colPos","tx_container_parent","frame_class" +,"1","1","b13-2cols-with-header-container","container","256","0","0","none" +,"2","1","header","second child","512","201","1","none" +,"3","1","header","first child","384","201","1","none" diff --git a/Tests/Functional/Frontend/Fixtures/Templates/ContainerWithTwoChildren.html b/Tests/Functional/Frontend/Fixtures/Templates/ContainerWithTwoChildren.html index 511491c8..19fb1958 100644 --- a/Tests/Functional/Frontend/Fixtures/Templates/ContainerWithTwoChildren.html +++ b/Tests/Functional/Frontend/Fixtures/Templates/ContainerWithTwoChildren.html @@ -2,7 +2,16 @@ xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true" > - -
{child.header}
-
+content area + + +
{record.header}
+
+
+container-processor + + +
{child.header}
+
+
\ No newline at end of file diff --git a/Tests/Functional/Frontend/Fixtures/TypoScript/container_from_other_page.typoscript b/Tests/Functional/Frontend/Fixtures/TypoScript/container_from_other_page.typoscript index 31586179..78c8b486 100644 --- a/Tests/Functional/Frontend/Fixtures/TypoScript/container_from_other_page.typoscript +++ b/Tests/Functional/Frontend/Fixtures/TypoScript/container_from_other_page.typoscript @@ -1,7 +1,3 @@ -@import 'EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript' -@import 'EXT:container_example/Configuration/TypoScript/setup.typoscript' - -page = PAGE -page.config.disableAllHeaderCode = 1 +page.20 > page.20 < tt_content.b13-2cols-with-header-container page.20.dataProcessing.200.contentId = 1 diff --git a/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript b/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript index 3386506c..2bf5cce9 100644 --- a/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript +++ b/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript @@ -1,5 +1,4 @@ @import 'EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript' -@import 'EXT:container_example/Configuration/TypoScript/setup.typoscript' page = PAGE page.config.disableAllHeaderCode = 1 diff --git a/Tests/Functional/Frontend/Fixtures/TypoScript/setup_skip_rendering_child_content.typoscript b/Tests/Functional/Frontend/Fixtures/TypoScript/setup_skip_rendering_child_content.typoscript index bd29911c..4cc3b863 100644 --- a/Tests/Functional/Frontend/Fixtures/TypoScript/setup_skip_rendering_child_content.typoscript +++ b/Tests/Functional/Frontend/Fixtures/TypoScript/setup_skip_rendering_child_content.typoscript @@ -1,5 +1,5 @@ @import 'EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript' -@import 'EXT:container_example/Configuration/TypoScript/setup.typoscript' +@import 'EXT:container_example/Configuration/Sets/ContainerExample/setup.typoscript' tt_content.b13-2cols-with-header-container.dataProcessing.200.skipRenderingChildContent = 1 diff --git a/Tests/Functional/Frontend/Fixtures/default_language.csv b/Tests/Functional/Frontend/Fixtures/default_language.csv index 919f5cf3..558886ed 100644 --- a/Tests/Functional/Frontend/Fixtures/default_language.csv +++ b/Tests/Functional/Frontend/Fixtures/default_language.csv @@ -2,7 +2,7 @@ ,"uid","pid","title","slug" ,1,0,"page-1","/" "tt_content" -,"uid","pid","CType","header","sorting","sys_language_uid","colPos","tx_container_parent" -,1,1,"b13-2cols-with-header-container","container-default",256,0,, -,2,1,"header","header-default",128,0,200,1 -,3,1,"header","left-side-default",64,0,201,1 \ No newline at end of file +,"uid","pid","CType","header","sorting","sys_language_uid","colPos","tx_container_parent","frame_class", +,1,1,"b13-2cols-with-header-container","container-default",256,0,,,"none" +,2,1,"header","header-default",128,0,200,1,"none" +,3,1,"header","left-side-default",64,0,201,1,"none" \ No newline at end of file diff --git a/Tests/Functional/Frontend/Fixtures/default_language_ContentArea.csv b/Tests/Functional/Frontend/Fixtures/default_language_ContentArea.csv deleted file mode 100644 index bde8fa79..00000000 --- a/Tests/Functional/Frontend/Fixtures/default_language_ContentArea.csv +++ /dev/null @@ -1,8 +0,0 @@ -"pages" -,"uid","pid","title","slug" -,1,0,"page-1","/" -"tt_content" -,"uid","pid","CType","header","sorting","sys_language_uid","colPos","tx_container_parent" -,1,1,"b13-2cols-content-area","container-default",256,0,, -,2,1,"header","left-side-default",128,0,200,1 -,3,1,"header","right-side-default",64,0,201,1 diff --git a/Tests/Functional/Frontend/LanguageFallbackTest.php b/Tests/Functional/Frontend/LanguageFallbackTest.php index 371c57b8..baa65dcc 100644 --- a/Tests/Functional/Frontend/LanguageFallbackTest.php +++ b/Tests/Functional/Frontend/LanguageFallbackTest.php @@ -24,7 +24,10 @@ protected function setUp(): void 1, [ 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], - 'setup' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExample/setup.typoscript', + ], ] ); } diff --git a/Tests/Functional/Frontend/LanguageStrictTest.php b/Tests/Functional/Frontend/LanguageStrictTest.php index 7e1f6aba..8adc439e 100644 --- a/Tests/Functional/Frontend/LanguageStrictTest.php +++ b/Tests/Functional/Frontend/LanguageStrictTest.php @@ -24,7 +24,10 @@ protected function setUp(): void 1, [ 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], - 'setup' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExample/setup.typoscript', + ], ] ); } diff --git a/Tests/Functional/Frontend/SiteLanguageFreeTest.php b/Tests/Functional/Frontend/SiteLanguageFreeTest.php index 1d8b14b1..c25b1615 100644 --- a/Tests/Functional/Frontend/SiteLanguageFreeTest.php +++ b/Tests/Functional/Frontend/SiteLanguageFreeTest.php @@ -24,7 +24,10 @@ protected function setUp(): void 1, [ 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], - 'setup' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExample/setup.typoscript', + ], ] ); } diff --git a/Tests/Functional/Frontend/WorkspaceTest.php b/Tests/Functional/Frontend/WorkspaceTest.php index a81ca546..d555f4f0 100644 --- a/Tests/Functional/Frontend/WorkspaceTest.php +++ b/Tests/Functional/Frontend/WorkspaceTest.php @@ -26,7 +26,10 @@ protected function setUp(): void 1, [ 'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], - 'setup' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript'], + 'setup' => [ + 'EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript', + 'EXT:container_example/Configuration/Sets/ContainerExample/setup.typoscript', + ], ] ); }