Skip to content

Commit 3eddad2

Browse files
committed
[TASK] v14 tests
conflicts with symfony/dependency-injection 7.4 s. https://review.typo3.org/c/Packages/TYPO3.CMS/+/91926
1 parent 4f7ad98 commit 3eddad2

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ jobs:
5050
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s functional
5151
if: matrix.TYPO3 != '14'
5252

53+
- name: Functional Tests 14
54+
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s functional --skip-group=content_defender
55+
if: matrix.TYPO3 == '14'
56+
5357
- name: Acceptance Tests
5458
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s acceptance -- --fail-fast
5559
if: matrix.TYPO3 != '14'

Tests/Functional/Integrity/IntegrityTest.php

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
use B13\Container\Integrity\Error\WrongPidError;
1616
use B13\Container\Integrity\Integrity;
1717
use B13\Container\Integrity\IntegrityFix;
18+
use TYPO3\CMS\Backend\Context\PageContext;
19+
use TYPO3\CMS\Backend\Domain\Model\Language\PageLanguageInformation;
1820
use TYPO3\CMS\Backend\View\BackendLayout\BackendLayout;
1921
use TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher;
2022
use TYPO3\CMS\Backend\View\Drawing\DrawingConfiguration;
@@ -25,6 +27,7 @@
2527
use TYPO3\CMS\Core\Information\Typo3Version;
2628
use TYPO3\CMS\Core\Localization\LanguageServiceFactory;
2729
use TYPO3\CMS\Core\Site\Entity\Site;
30+
use TYPO3\CMS\Core\Type\Bitmask\Permission;
2831
use TYPO3\CMS\Core\Utility\GeneralUtility;
2932
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
3033

@@ -90,10 +93,37 @@ public function wrongPidErrorElementsAreShownAsUnusedElements(): void
9093
$site = $this->getMockBuilder(Site::class)->disableOriginalConstructor()->getMock();
9194
$drawingConfiguration = $this->getMockBuilder(DrawingConfiguration::class)->disableOriginalConstructor()->getMock();
9295
$serverRequest = $this->getMockBuilder(ServerRequest::class)->disableOriginalConstructor()->getMock();
93-
$pageLayoutContext = new PageLayoutContext($pageRecord, $backendLayout, $site, $drawingConfiguration, $serverRequest);
96+
if (GeneralUtility::makeInstance(Typo3Version::class)->getMajorVersion() < 14) {
97+
$pageLayoutContext = new PageLayoutContext($pageRecord, $backendLayout, $site, $drawingConfiguration, $serverRequest);
98+
$contentFetcher = new ContentFetcher($pageLayoutContext);
99+
$unusedRecords = $contentFetcher->getUnusedRecords();
100+
} else {
101+
$pageLanguageInformation = new PageLanguageInformation(
102+
$pageRecord['uid'],
103+
[],
104+
[],
105+
[],
106+
[0],
107+
false,
108+
[]
109+
);
110+
$pageContext = new PageContext(
111+
$pageRecord['uid'],
112+
$pageRecord,
113+
$site,
114+
[],
115+
[],
116+
[],
117+
$pageLanguageInformation,
118+
new Permission()
119+
);
120+
$pageLayoutContext = new PageLayoutContext($pageContext, $backendLayout, $drawingConfiguration, $serverRequest);
121+
$container = $this->get('service_container');
122+
$contentFetcher = $container->get(ContentFetcher::class);
123+
$unusedRecords = $contentFetcher->getUnusedRecords($pageLayoutContext);
124+
}
94125
}
95-
$contentFetcher = new ContentFetcher($pageLayoutContext);
96-
$unusedRecords = $contentFetcher->getUnusedRecords();
126+
97127
$unusedRecordsArr = [];
98128
foreach ($unusedRecords as $unusedRecord) {
99129
$unusedRecordsArr[] = $unusedRecord;

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"require": {
88
"typo3/cms-backend": "^11.5 || ^12.4 || ^13.4 || ^14.0"
99
},
10+
"conflict": {
11+
"symfony/dependency-injection": "7.4.0"
12+
},
1013
"autoload": {
1114
"psr-4": {
1215
"B13\\Container\\": "Classes/"

0 commit comments

Comments
 (0)