Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
if: matrix.TYPO3 == '13'

- name: Functional Tests 14
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s functional -- --exclude-group content_defender
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s functional
if: matrix.TYPO3 != '13'

- name: Acceptance Tests
Expand Down
2 changes: 2 additions & 0 deletions Classes/Integrity/Sorting.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ protected function unsetContentDefenderConfiguration(string $cType): void
// unset content_defender configuration for migration because already unallowed children in container may exist
foreach ($GLOBALS['TCA']['tt_content']['containerConfiguration'][$cType]['grid'] ?? [] as $rowKey => $row) {
foreach ($row as $colKey => $column) {
$column['allowedContentTypes'] = '';
$column['disallowedContentTypes'] = '';
$column['allowed'] = [];
$column['disallowed'] = [];
$column['maxitems'] = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
,1,1,"b13-2cols-with-header-container","",256,0,0,0,0,0
,2,1,"b13-2cols-with-header-container","",512,1,0,0,0,1
,3,1,"header","",1024,0,202,1,0,0
,4,1,"header"," (copy 1)",768,1,202,2,0,3
,4,1,"header","",768,1,202,2,0,3
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
,1,1,"b13-2cols-with-header-container","",256,0,0,0,0,0
,2,1,"b13-2cols-with-header-container","",512,1,0,0,1,1
,3,1,"header","",1024,0,202,1,0,0
,4,1,"header"," (copy 1)",1280,1,202,1,3,3
,4,1,"header","",1280,1,202,1,3,3
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"pages"
,"uid","pid","title"
,1,0,""
,2,0,""
"tt_content"
,"uid","pid","CType","header","sorting","sys_language_uid","colPos","tx_container_parent","l18n_parent","l10n_source"
,1,1,"b13-2cols-with-header-container","",256,0,0,0,0,0
,2,1,"b13-2cols-with-header-container","",512,1,0,0,0,1
,3,1,"header","",1024,0,202,1,0,0
,4,1,"header"," (copy 1)",768,1,202,2,0,3
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"pages"
,"uid","pid","title"
,1,0,""
,2,0,""
"tt_content"
,"uid","pid","CType","header","sorting","sys_language_uid","colPos","tx_container_parent","l18n_parent","l10n_source"
,1,1,"b13-2cols-with-header-container","",256,0,0,0,0,0
,2,1,"b13-2cols-with-header-container","",512,1,0,0,1,1
,3,1,"header","",1024,0,202,1,0,0
,4,1,"header"," (copy 1)",1280,1,202,1,3,3
12 changes: 10 additions & 2 deletions Tests/Functional/Datahandler/ContentDefender/MaxItemsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,11 @@ public function canTranslateChildIfContainerOfDefaultLanguageMaxitemsIsReached()
$this->dataHandler->start([], $cmdmap, $this->backendUser);
$this->dataHandler->process_datamap();
$this->dataHandler->process_cmdmap();
self::assertCSVDataSet(__DIR__ . '/Fixtures/Maxitems/CanTranslateChildIfContainerOfDefaultLanguageMaxitemsIsReachedResult.csv');
if ((new Typo3Version())->getMajorVersion() < 14 || (new Typo3Version())->getBranch() === '14.1') {
self::assertCSVDataSet(__DIR__ . '/Fixtures/Maxitems/LegacyCanTranslateChildIfContainerOfDefaultLanguageMaxitemsIsReachedResult.csv');
} else {
self::assertCSVDataSet(__DIR__ . '/Fixtures/Maxitems/CanTranslateChildIfContainerOfDefaultLanguageMaxitemsIsReachedResult.csv');
}
if ((new Typo3Version())->getMajorVersion() < 14) {
self::assertEmpty($this->dataHandler->errorLog, 'dataHander error log is not empty');
} else {
Expand All @@ -386,7 +390,11 @@ public function canCopyToLanguageChildIfContainerOfDefaultLanguageMaxitemsIsReac
$this->dataHandler->start([], $cmdmap, $this->backendUser);
$this->dataHandler->process_datamap();
$this->dataHandler->process_cmdmap();
self::assertCSVDataSet(__DIR__ . '/Fixtures/Maxitems/CanCopyToLanguageChildIfContainerOfDefaultLanguageMaxitemsIsReachedResult.csv');
if ((new Typo3Version())->getMajorVersion() < 14 || (new Typo3Version())->getBranch() === '14.1') {
self::assertCSVDataSet(__DIR__ . '/Fixtures/Maxitems/LegacyCanCopyToLanguageChildIfContainerOfDefaultLanguageMaxitemsIsReachedResult.csv');
} else {
self::assertCSVDataSet(__DIR__ . '/Fixtures/Maxitems/CanCopyToLanguageChildIfContainerOfDefaultLanguageMaxitemsIsReachedResult.csv');
}
if ((new Typo3Version())->getMajorVersion() < 14) {
self::assertEmpty($this->dataHandler->errorLog, 'dataHander error log is not empty');
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use PHPUnit\Framework\Attributes\Test;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Localization\LanguageServiceFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
Expand All @@ -30,13 +31,15 @@ class SortingWithContentDefenderTest extends FunctionalTestCase
protected array $testExtensionsToLoad = [
'typo3conf/ext/container',
'typo3conf/ext/container_example',
'typo3conf/ext/content_defender',
];

protected ?Sorting $sorting = null;

protected function setUp(): void
{
if ((new Typo3Version())->getMajorVersion() < 14) {
$this->testExtensionsToLoad[] = 'typo3conf/ext/content_defender';
}
parent::setUp();
$this->importCSVDataSet(__DIR__ . '/../Fixtures/be_users.csv');
$GLOBALS['BE_USER'] = $this->setUpBackendUser(1);
Expand Down