Commit 8234920
committed
[TASK] Replace custom
To make frontend requests within functional tests a proper
frontend page setup is required, and TYPO3 uses internally
a `SiteBasedTestTrait` for own tests, which is not provided
in distrubtion packages.
Extension created and maintained there own versions, and in
some cased tried to make it working against multiple TYPO3
versions. Doing the same work again and again when having
multiple extension in the portfolio is a inefficient way.
To mitigate this, a dedicated package has been created now
to provide it in a central way and maintain it in one place.
This change replaces a custom implementation or the usage of
the TYPO3 implementation added with a source install of the
`EXT:core` system extension making the use easier.
The new package is added as development dependency and usage
throughout the functional tests are replaced and finaly the
custom implementation removed.
The package also provides a extended `FunctionalTestCase`,
which is also used to prepare for proper SiteSets based
functional frontend request testing by overriding a method
essential in this case to make it possible **not** to create
a `sys_template` record.
As a sideeffect we can now remove some phpstan error patterns,
which are properly defined and mitigated with the 3rd party
package.
Used command(s):
```shell
Build/Scripts/runTests.sh -p 8.1 -t 12 -s composer -- \
require --dev \
'sbuerk/typo3-site-based-test-trait':'^1.0.2 || ^2.0.1' \
&& Build/Scripts/runTests.sh -p 8.1 -t 12 -s composerUpdate \
&& Build/Scripts/runTests.sh -p 8.1 -t 12 -s cgl \
&& Build/Scripts/runTests.sh -p 8.1 -t 12 -s phpstanGenerateBaseline \
&& Build/Scripts/runTests.sh -p 8.2 -t 13 -s composerUpdate \
&& Build/Scripts/runTests.sh -p 8.2 -t 13 -s phpstanGenerateBaseline
```SiteBaseTestTrait implementation1 parent e197e4b commit 8234920
File tree
16 files changed
+72
-1404
lines changed- Build/phpstan
- Core12
- Core13
- Tests/Functional
- Container
- Fixtures
- Frontend
- Traits
- Hooks
- Regression
- Services
- Updates
16 files changed
+72
-1404
lines changedLarge diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments