Skip to content
Snippets Groups Projects
Commit 77bbe4e9 authored by Stefan Bürk's avatar Stefan Bürk
Browse files

[TASK] Use `SiteConfiguration` from DI in `SiteBasedTestTrait`

`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.

This change now uses the `SiteConfiguration` from the test
instance `Dependency Injection container` which ensures that
the internal first level cache is properly reset on `write()`
actions.

Resolves: #103470
Releases: main, 12.4
Change-Id: I70368e56abd10e55f06d3813371c4538ad704136
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83540


Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent f6015fde
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment