Project

General

Profile

Actions

Task #103470

closed

Use `SiteConfiguration` from DI in `SiteBasedTestTrait`

Added by Stefan Bürk 8 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Tests
Target version:
-
Start date:
2024-03-22
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

`SiteBasedTestTrait` created a instance of the `SiteConfiguration`
using the PHP `new` keyword for writing functional test instance
site configurations.

It is possible, that the `SiteConfiguration` is retrieved from
the `Dependency Injection container` by code executed before
the test releated site configuration is written, which does not
reset the instance based `SiteConfiguration->$firstLevelCache`
property and later retrieving site configurations using the
`SiteFinder`, for example in rootline and other operations,
cannot find the test instance configurations.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #103471: Ensure correct SiteConfiguration in `SlugServiceTest.php`ClosedStefan Bürk2024-03-22

Actions
Actions

Also available in: Atom PDF