[BUGFIX] Make copy mode of translation modal use localize 09/51109/8
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Fri, 30 Dec 2016 23:48:56 +0000 (00:48 +0100)
committerTymoteusz Motylewski <t.motylewski@gmail.com>
Mon, 9 Jan 2017 09:37:14 +0000 (10:37 +0100)
...  omitting TransOrigPointer

While translating elements with the localization modal we have to
make sure that the "Copy" mode does more than just a plain copy
followed by an update of the sys_language_uid. Otherwise related
elements will just be copied along but don't get a new language.

This patch replaces the copy action with a new action called
copyToLanguage. It behaves like localize action but does not set
TransOrigPointer fields, so child elements get the correct
language and are not connected to a language parent.

Resolves: #75400
Releases: master, 7.6
Change-Id: If57af3c94c67824ab8bbbc62a8c6bea283e96fca
Reviewed-on: https://review.typo3.org/51109
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
44 files changed:
typo3/sysext/backend/Classes/Controller/Page/LocalizationController.php
typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Tests/FunctionalTestCase.php
typo3/sysext/core/Documentation/Changelog/7.6.x/Important-75400-NewDataHandlerCommandCopyToLanguage.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/FAL/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/DataSet/copyContentToLanguage.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Framework/ActionService.php
typo3/sysext/core/Tests/Functional/DataHandling/Group/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/DataSet/copyContentToLanguageOfRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/DataSet/copyElementToLanguageOfRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageKeep.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageSelect.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageWAllChildrenKeep.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageWAllChildrenSelect.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageKeep.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageSelect.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageWAllChildrenKeep.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageWAllChildrenSelect.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/DataSet/copyCategoryToLanguageOfRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/DataSet/copyContentToLanguageOfRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguage.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Select/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/DataSet/copyContentToLanguageOfRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/DataSet/copyElementToLanguageOfRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/DataSet/copyContentToLanguage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/DataSet/copyContentToLanguage.csv [new file with mode: 0644]

index 6df2ffa..c11bbc7 100644 (file)
@@ -221,22 +221,8 @@ class LocalizationController
                     'localize' => $destLanguageId
                 ];
             } else {
-                $previousUid = $this->localizationRepository->getPreviousLocalizedRecordUid(
-                    'tt_content',
-                    $currentUid,
-                    $pageId,
-                    $srcLanguageId,
-                    $destLanguageId
-                );
                 $cmd['tt_content'][$currentUid] = [
-                    'copy' => [
-                        'action' => 'paste',
-                        'target' => -$previousUid,
-                        'update' => [
-                            'sys_language_uid' => $destLanguageId,
-                            'l18n_parent' => 0
-                        ]
-                    ]
+                    'copyToLanguage' => $destLanguageId,
                 ];
             }
         }
index 7346fc8..d90b377 100644 (file)
@@ -145,19 +145,19 @@ class LocalizationControllerTest extends FunctionalTestCase
                 'pid' => '1',
                 'sys_language_uid' => '2',
                 'l18n_parent' => '0',
-                'header' => 'Test content 1 (copy 1)',
+                'header' => '[Translate to Deutsch:] Test content 1',
             ],
             [
                 'pid' => '1',
                 'sys_language_uid' => '2',
                 'l18n_parent' => '0',
-                'header' => 'Test content 2 (copy 1)',
+                'header' => '[Translate to Deutsch:] Test content 2',
             ],
             [
                 'pid' => '1',
                 'sys_language_uid' => '2',
                 'l18n_parent' => '0',
-                'header' => 'Test content 3 (copy 1)',
+                'header' => '[Translate to Deutsch:] Test content 3',
             ],
         ];
         $results = $this->getDatabaseConnection()->exec_SELECTgetRows('pid, sys_language_uid, l18n_parent, header', 'tt_content', 'pid = 1 AND sys_language_uid = 2');
@@ -185,19 +185,19 @@ class LocalizationControllerTest extends FunctionalTestCase
                 'pid' => '1',
                 'sys_language_uid' => '2',
                 'l18n_parent' => '0',
-                'header' => 'Test indhold 1 (copy 1)',
+                'header' => '[Translate to Deutsch:] Test indhold 1',
             ],
             [
                 'pid' => '1',
                 'sys_language_uid' => '2',
                 'l18n_parent' => '0',
-                'header' => 'Test indhold 2 (copy 1)',
+                'header' => '[Translate to Deutsch:] Test indhold 2',
             ],
             [
                 'pid' => '1',
                 'sys_language_uid' => '2',
                 'l18n_parent' => '0',
-                'header' => 'Test indhold 3 (copy 1)',
+                'header' => '[Translate to Deutsch:] Test indhold 3',
             ],
         ];
         $results = $this->getDatabaseConnection()->exec_SELECTgetRows('pid, sys_language_uid, l18n_parent, header', 'tt_content', 'pid = 1 AND sys_language_uid = 2');
@@ -249,25 +249,25 @@ class LocalizationControllerTest extends FunctionalTestCase
                 'pid' => '1',
                 'sys_language_uid' => '1',
                 'l18n_parent' => '0',
-                'header' => 'Test content 1 (copy 1)',
+                'header' => '[Translate to Dansk:] Test content 1',
             ],
             [
                 'pid' => '1',
                 'sys_language_uid' => '1',
                 'l18n_parent' => '0',
-                'header' => 'Test content 2 (copy 1)',
+                'header' => '[Translate to Dansk:] Test content 2.5',
             ],
             [
                 'pid' => '1',
                 'sys_language_uid' => '1',
                 'l18n_parent' => '0',
-                'header' => 'Test content 2.5 (copy 1)',
+                'header' => '[Translate to Dansk:] Test content 2',
             ],
             [
                 'pid' => '1',
                 'sys_language_uid' => '1',
                 'l18n_parent' => '0',
-                'header' => 'Test content 3 (copy 1)',
+                'header' => '[Translate to Dansk:] Test content 3',
             ],
         ];
         $results = $this->getDatabaseConnection()->exec_SELECTgetRows('pid, sys_language_uid, l18n_parent, header', 'tt_content', 'pid = 1 AND sys_language_uid = 1', '', 'sorting ASC');
index dd27330..4300c90 100644 (file)
@@ -146,6 +146,15 @@ class DataHandler
     public $clear_flexFormData_vDEFbase = false;
 
     /**
+     * Will distinguish between translations (with parent) and localizations (without parent) while still using the same methods to copy the records
+     * TRUE: translation of a record connected to the default language
+     * FALSE: localization of a record without connection to the default language
+     *
+     * @var bool
+     */
+    protected $useTransOrigPointerField = true;
+
+    /**
      * TRUE: (traditional) Updates when record is saved. For flexforms, updates if change is made to the localized value.
      * FALSE: Will not update anything.
      * "FORCE_FFUPD" (string): Like TRUE, but will force update to the FlexForm Field
@@ -3358,6 +3367,11 @@ class DataHandler
                                 $procId = $this->copyMappingArray[$table][$id];
                                 break;
                             case 'localize':
+                                $this->useTransOrigPointerField = true;
+                                $this->localize($table, $id, $value);
+                                break;
+                            case 'copyToLanguage':
+                                $this->useTransOrigPointerField = false;
                                 $this->localize($table, $id, $value);
                                 break;
                             case 'inlineLocalizeSynchronize':
@@ -4575,7 +4589,10 @@ class DataHandler
         }
 
         $this->registerNestedElementCall($table, $uid, 'localize');
-        if ((!$GLOBALS['TCA'][$table]['ctrl']['languageField'] || !$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] || $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable']) && $table !== 'pages') {
+        if ((!$GLOBALS['TCA'][$table]['ctrl']['languageField']
+                || !$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']
+                || $table === 'pages_language_overay')
+            && $table !== 'pages') {
             if ($this->enableLogging) {
                 $this->newlog('Localization failed; "languageField" and "transOrigPointerField" must be defined for the table!', 1);
             }
@@ -4655,8 +4672,12 @@ class DataHandler
         // If the translated record is a default language record, set it's uid as localization parent of the new record.
         // If translating from any other language, no override is needed; we just can copy the localization parent of
         // the original record (which is pointing to the correspondent default language record) to the new record.
-        if ((int)$row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] === 0 || $table === 'pages') {
+        // In copy / free mode the TransOrigPointer field is always set to 0, as no connection to the localization parent is wanted in that case.
+        if (($this->useTransOrigPointerField && (int)$row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] === 0)
+            || $table === 'pages') {
             $overrideValues[$GLOBALS['TCA'][$Ttable]['ctrl']['transOrigPointerField']] = $uid;
+        } elseif (!$this->useTransOrigPointerField) {
+            $overrideValues[$GLOBALS['TCA'][$Ttable]['ctrl']['transOrigPointerField']] = 0;
         }
         // Copy the type (if defined in both tables) from the original record so that translation has same type as original record
         if (isset($GLOBALS['TCA'][$table]['ctrl']['type']) && isset($GLOBALS['TCA'][$Ttable]['ctrl']['type'])) {
@@ -8570,4 +8591,4 @@ class DataHandler
     {
         return ResourceFactory::getInstance();
     }
-}
+}
\ No newline at end of file
index 1aba1eb..68dd4da 100644 (file)
@@ -351,6 +351,7 @@ abstract class FunctionalTestCase extends BaseTestCase
             $templateFields['config'] .= '<INCLUDE_TYPOSCRIPT: source="FILE:' . $typoScriptFile . '">' . LF;
         }
 
+        $this->getDatabaseConnection()->exec_DELETEquery('sys_template', 'pid = ' . $pageId);
         $this->getDatabaseConnection()->exec_INSERTquery('sys_template', $templateFields);
     }
 
diff --git a/typo3/sysext/core/Documentation/Changelog/7.6.x/Important-75400-NewDataHandlerCommandCopyToLanguage.rst b/typo3/sysext/core/Documentation/Changelog/7.6.x/Important-75400-NewDataHandlerCommandCopyToLanguage.rst
new file mode 100644 (file)
index 0000000..f7cdaf2
--- /dev/null
@@ -0,0 +1,21 @@
+.. include:: ../../Includes.txt
+
+============================================================
+Important: #75400 - New DataHandler command 'copyToLanguage'
+============================================================
+
+See :issue:`75400`
+
+Description
+===========
+
+A new DataHandler command 'copyToLanguage' has been introduced. It behaves like 'localize' command
+(both record and child records are copied to given language), but does not set transOrigPointerField fields (e.g. l10n_parent).
+
+The 'copyToLanguage' command should be used when localizing records in the "Free Mode". This command is used when localizing
+content elements using translation wizard's "Copy" strategy.
+
+The 'localize' DataHandler command should be used when translating records in "Connected Mode" (strict translation of records from the default language).
+This command is used when selecting "Translate" strategy in content elements translation wizard.
+
+.. index:: PHP-API
\ No newline at end of file
index c88f928..b224d85 100644 (file)
@@ -88,6 +88,15 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
     }
 
     /**
+     * @see Modify/DataSet/copyContentToLanguage.csv
+     */
+    public function copyContentToLanguage()
+    {
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+    }
+
+    /**
      * @see Modify/DataSet/localizeContent.csv
      */
     public function localizeContent()
index 45574a1..20846c3 100644 (file)
@@ -80,6 +80,28 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\FAL\Abstr
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguage.csv
+     */
+    public function copyContentToLanguage()
+    {
+        parent::copyContentToLanguage();
+        $this->assertAssertionDataSet('copyContentToLanguage');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Regular Element #2'));
+
+        $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['localizedContentId'])->setRecordField(self::FIELD_ContentImage)
+            ->setTable(self::TABLE_FileReference)->setField('title')->setValues('[Translate to Dansk:] This is Kasper', '[Translate to Dansk:] Taken at T3BOARD'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContent.csv
      */
     public function localizeContent()
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/DataSet/copyContentToLanguage.csv b/typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/DataSet/copyContentToLanguage.csv
new file mode 100644 (file)
index 0000000..d8f00fd
--- /dev/null
@@ -0,0 +1,13 @@
+sys_file_reference,,,,,,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,uid_local,uid_foreign,tablenames,fieldname,sorting_foreign,table_local,title,description,alternative,link
+,126,89,128,0,0,0,0,0,0,0,0,0,1,330,tt_content,image,2,sys_file,T3BOARD,,,
+,127,89,64,0,0,0,0,0,0,0,0,0,21,330,tt_content,image,1,sys_file,Kasper,,,
+,128,89,32,0,0,0,0,0,0,0,0,0,21,331,tt_content,image,1,sys_file,Taken at T3BOARD,,,
+,129,89,16,0,0,0,0,0,0,0,0,0,1,331,tt_content,image,2,sys_file,This is Kasper,,,
+,130,89,48,0,1,0,0,0,0,0,0,0,21,332,tt_content,image,1,sys_file,[Translate to Dansk:] Taken at T3BOARD,,,
+,131,89,24,0,1,0,0,0,0,0,0,0,1,332,tt_content,image,2,sys_file,[Translate to Dansk:] This is Kasper,,,
+tt_content,,,,,,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,,,,,,,,
+,330,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,2,,,,,,,,
+,331,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,2,,,,,,,,
+,332,89,768,0,1,0,331,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,2,,,,,,,,
index 5a8c810..4e41e23 100644 (file)
@@ -305,6 +305,27 @@ class ActionService
     /**
      * @param string $tableName
      * @param int $uid
+     * @param int $languageId
+     * @return array
+     */
+    public function copyRecordToLanguage($tableName, $uid, $languageId)
+    {
+        $commandMap = [
+            $tableName => [
+                $uid => [
+                    'copyToLanguage' => $languageId,
+                ],
+            ],
+        ];
+        $this->createDataHandler();
+        $this->dataHandler->start([], $commandMap);
+        $this->dataHandler->process_cmdmap();
+        return $this->dataHandler->copyMappingArray;
+    }
+
+    /**
+     * @param string $tableName
+     * @param int $uid
      * @param string $fieldName
      * @param array $referenceIds
      */
index 2a2821a..b0950f8 100644 (file)
@@ -189,6 +189,26 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguageOfRelation.csv
+     */
+    public function copyContentToLanguageOfRelation()
+    {
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyElementToLanguageOfRelation.csv
+     */
+    public function copyElementToLanguageOfRelation()
+    {
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Element, self::VALUE_ElementIdFirst, self::VALUE_LanguageId);
+        $this->recordIds['localizedElementId'] = $newTableIds[self::TABLE_Element][self::VALUE_ElementIdFirst];
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentOfRelation.csv
      */
     public function localizeContentOfRelation()
index 43898cc..658b407 100644 (file)
@@ -237,6 +237,42 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\Group\Abs
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguageOfRelation.csv
+     */
+    public function copyContentToLanguageOfRelation()
+    {
+        parent::copyContentToLanguageOfRelation();
+        $this->assertAssertionDataSet('copyContentToLanguageOfRelation');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['localizedContentId'])->setRecordField(self::FIELD_ContentElement)
+            ->setTable(self::TABLE_Element)->setField('title')->setValues('Element #2', 'Element #3'));
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyElementToLanguageOfRelation.csv
+     */
+    public function copyElementToLanguageOfRelation()
+    {
+        parent::copyElementToLanguageOfRelation();
+        $this->assertAssertionDataSet('copyElementToLanguageOfRelation');
+
+        //in this case the translated element is orphaned (no CE with relation to it, and it has no l10n_parent)
+        //so on frontend there is no change.
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentElement)
+            ->setTable(self::TABLE_Element)->setField('title')->setValues('Element #1', 'Element #2'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentOfRelation.csv
      */
     public function localizeContentOfRelation()
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/DataSet/copyContentToLanguageOfRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/DataSet/copyContentToLanguageOfRelation.csv
new file mode 100644 (file)
index 0000000..09d8f0a
--- /dev/null
@@ -0,0 +1,16 @@
+pages,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,,,
+,1,0,256,0,0,0,0,0,0,0,FunctionalTest,,,
+,88,1,256,0,0,0,0,0,0,0,DataHandlerTest,,,
+,89,88,256,0,0,0,0,0,0,0,Relations,,,
+,90,88,512,0,0,0,0,0,0,0,Target,,,
+tt_content,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_testdatahandler_group
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,"1,2"
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,"2,3"
+,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,"2,3"
+tx_testdatahandler_element,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,
+,1,89,256,0,0,0,0,0,0,0,0,0,Element #1,
+,2,89,512,0,0,0,0,0,0,0,0,0,Element #2,
+,3,89,768,0,0,0,0,0,0,0,0,0,Element #3,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/DataSet/copyElementToLanguageOfRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/DataSet/copyElementToLanguageOfRelation.csv
new file mode 100644 (file)
index 0000000..6b65cc8
--- /dev/null
@@ -0,0 +1,16 @@
+pages,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,,,
+,1,0,256,0,0,0,0,0,0,0,FunctionalTest,,,
+,88,1,256,0,0,0,0,0,0,0,DataHandlerTest,,,
+,89,88,256,0,0,0,0,0,0,0,Relations,,,
+,90,88,512,0,0,0,0,0,0,0,Target,,,
+tt_content,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_testdatahandler_group
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,"1,2"
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,"2,3"
+tx_testdatahandler_element,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,
+,1,89,256,0,0,0,0,0,0,0,0,0,Element #1,
+,2,89,512,0,0,0,0,0,0,0,0,0,Element #2,
+,3,89,768,0,0,0,0,0,0,0,0,0,Element #3,
+,4,89,384,0,1,0,1,0,0,0,0,0,[Translate to Dansk:] Element #1,
index add1729..586ee67 100644 (file)
@@ -99,6 +99,54 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
     }
 
     /**
+     * @see DataSet/copyParentContentToLanguageKeep.csv
+     */
+    public function copyParentContentToLanguageInKeepMode()
+    {
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizationMode'] = 'keep';
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization'] = false;
+        $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization'] = false;
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+    }
+
+    /**
+     * @see DataSet/copyParentContentToLanguageWAllChildrenKeep.csv
+     */
+    public function copyParentContentToLanguageWithAllChildrenInKeepMode()
+    {
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizationMode'] = 'keep';
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true;
+        $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true;
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+    }
+
+    /**
+     * @see DataSet/copyParentContentToLanguageSelect.csv
+     */
+    public function copyParentContentToLanguageInSelectMode()
+    {
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizationMode'] = 'select';
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization'] = false;
+        $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization'] = false;
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+    }
+
+    /**
+     * @see DataSet/copyParentContentToLanguageWAllChildrenSelect.csv
+     */
+    public function copyParentContentToLanguageWithAllChildrenInSelectMode()
+    {
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizationMode'] = 'select';
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true;
+        $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true;
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+    }
+
+    /**
      * @see DataSet/localizeParentContentKeep.csv
      */
     public function localizeParentContentInKeepMode()
index e7020be..e1e215b 100644 (file)
@@ -105,6 +105,70 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\
 
     /**
      * @test
+     * @see DataSet/copyParentContentToLanguageKeep.csv
+     */
+    public function copyParentContentToLanguageInKeepMode()
+    {
+        parent::copyParentContentToLanguageInKeepMode();
+        $this->assertAssertionDataSet('copyParentContentToLanguageKeep');
+
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
+            ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyParentContentToLanguageWAllChildrenKeep.csv
+     */
+    public function copyParentContentToLanguageWithAllChildrenInKeepMode()
+    {
+        parent::copyParentContentToLanguageWithAllChildrenInKeepMode();
+        $this->assertAssertionDataSet('copyParentContentToLanguageWAllChildrenKeep');
+
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
+            ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyParentContentToLanguageSelect.csv
+     */
+    public function copyParentContentToLanguageInSelectMode()
+    {
+        parent::copyParentContentToLanguageInSelectMode();
+        $this->assertAssertionDataSet('copyParentContentToLanguageSelect');
+
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
+            ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyParentContentToLanguageWAllChildrenSelect.csv
+     */
+    public function copyParentContentToLanguageWithAllChildrenInSelectMode()
+    {
+        parent::copyParentContentToLanguageWithAllChildrenInSelectMode();
+        $this->assertAssertionDataSet('copyParentContentToLanguageWAllChildrenSelect');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['localizedContentId'])->setRecordField(self::FIELD_ContentHotel)
+            ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeParentContentKeep.csv
      */
     public function localizeParentContentInKeepMode()
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageKeep.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageKeep.csv
new file mode 100644 (file)
index 0000000..2d93e8e
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,"3,4"
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,5
+,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,
+tx_irretutorial_1ncsv_hotel,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,0,Hotel #1,"5,6"
+,4,89,128,0,0,0,0,0,0,0,0,0,Hotel #2,7
+,5,89,64,0,0,0,0,0,0,0,0,0,Hotel #1,8
+tx_irretutorial_1ncsv_offer,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,0,0,0,0,0,0,0,0,0,Offer #1.1,"7,8,9"
+,6,89,128,0,0,0,0,0,0,0,0,0,Offer #1.2,"10,11"
+,7,89,64,0,0,0,0,0,0,0,0,0,Offer #2.1,12
+,8,89,32,0,0,0,0,0,0,0,0,0,Offer #1.1,13
+tx_irretutorial_1ncsv_price,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,
+,7,89,256,0,0,0,0,0,0,0,0,0,Price #1.1.1,
+,8,89,128,0,0,0,0,0,0,0,0,0,Price #1.1.2,
+,9,89,64,0,0,0,0,0,0,0,0,0,Price #1.1.3,
+,10,89,32,0,0,0,0,0,0,0,0,0,Price #1.2.1,
+,11,89,16,0,0,0,0,0,0,0,0,0,Price #1.2.2,
+,12,89,8,0,0,0,0,0,0,0,0,0,Price #2.1.1,
+,13,89,4,0,0,0,0,0,0,0,0,0,Price #1.1.1,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageSelect.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageSelect.csv
new file mode 100644 (file)
index 0000000..2d93e8e
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,"3,4"
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,5
+,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,
+tx_irretutorial_1ncsv_hotel,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,0,Hotel #1,"5,6"
+,4,89,128,0,0,0,0,0,0,0,0,0,Hotel #2,7
+,5,89,64,0,0,0,0,0,0,0,0,0,Hotel #1,8
+tx_irretutorial_1ncsv_offer,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,0,0,0,0,0,0,0,0,0,Offer #1.1,"7,8,9"
+,6,89,128,0,0,0,0,0,0,0,0,0,Offer #1.2,"10,11"
+,7,89,64,0,0,0,0,0,0,0,0,0,Offer #2.1,12
+,8,89,32,0,0,0,0,0,0,0,0,0,Offer #1.1,13
+tx_irretutorial_1ncsv_price,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,
+,7,89,256,0,0,0,0,0,0,0,0,0,Price #1.1.1,
+,8,89,128,0,0,0,0,0,0,0,0,0,Price #1.1.2,
+,9,89,64,0,0,0,0,0,0,0,0,0,Price #1.1.3,
+,10,89,32,0,0,0,0,0,0,0,0,0,Price #1.2.1,
+,11,89,16,0,0,0,0,0,0,0,0,0,Price #1.2.2,
+,12,89,8,0,0,0,0,0,0,0,0,0,Price #2.1.1,
+,13,89,4,0,0,0,0,0,0,0,0,0,Price #1.1.1,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageWAllChildrenKeep.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageWAllChildrenKeep.csv
new file mode 100644 (file)
index 0000000..2d93e8e
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,"3,4"
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,5
+,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,
+tx_irretutorial_1ncsv_hotel,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,0,Hotel #1,"5,6"
+,4,89,128,0,0,0,0,0,0,0,0,0,Hotel #2,7
+,5,89,64,0,0,0,0,0,0,0,0,0,Hotel #1,8
+tx_irretutorial_1ncsv_offer,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,0,0,0,0,0,0,0,0,0,Offer #1.1,"7,8,9"
+,6,89,128,0,0,0,0,0,0,0,0,0,Offer #1.2,"10,11"
+,7,89,64,0,0,0,0,0,0,0,0,0,Offer #2.1,12
+,8,89,32,0,0,0,0,0,0,0,0,0,Offer #1.1,13
+tx_irretutorial_1ncsv_price,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,
+,7,89,256,0,0,0,0,0,0,0,0,0,Price #1.1.1,
+,8,89,128,0,0,0,0,0,0,0,0,0,Price #1.1.2,
+,9,89,64,0,0,0,0,0,0,0,0,0,Price #1.1.3,
+,10,89,32,0,0,0,0,0,0,0,0,0,Price #1.2.1,
+,11,89,16,0,0,0,0,0,0,0,0,0,Price #1.2.2,
+,12,89,8,0,0,0,0,0,0,0,0,0,Price #2.1.1,
+,13,89,4,0,0,0,0,0,0,0,0,0,Price #1.1.1,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageWAllChildrenSelect.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguageWAllChildrenSelect.csv
new file mode 100644 (file)
index 0000000..8f6125a
--- /dev/null
@@ -0,0 +1,28 @@
+tt_content,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,"3,4"
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,5
+,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,6
+tx_irretutorial_1ncsv_hotel,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,0,Hotel #1,"5,6"
+,4,89,128,0,0,0,0,0,0,0,0,0,Hotel #2,7
+,5,89,64,0,0,0,0,0,0,0,0,0,Hotel #1,8
+,6,89,96,0,1,0,5,0,0,0,0,0,[Translate to Dansk:] Hotel #1,9
+tx_irretutorial_1ncsv_offer,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,0,0,0,0,0,0,0,0,0,Offer #1.1,"7,8,9"
+,6,89,128,0,0,0,0,0,0,0,0,0,Offer #1.2,"10,11"
+,7,89,64,0,0,0,0,0,0,0,0,0,Offer #2.1,12
+,8,89,32,0,0,0,0,0,0,0,0,0,Offer #1.1,13
+,9,89,48,0,1,0,8,0,0,0,0,0,[Translate to Dansk:] Offer #1.1,14
+tx_irretutorial_1ncsv_price,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,
+,7,89,256,0,0,0,0,0,0,0,0,0,Price #1.1.1,
+,8,89,128,0,0,0,0,0,0,0,0,0,Price #1.1.2,
+,9,89,64,0,0,0,0,0,0,0,0,0,Price #1.1.3,
+,10,89,32,0,0,0,0,0,0,0,0,0,Price #1.2.1,
+,11,89,16,0,0,0,0,0,0,0,0,0,Price #1.2.2,
+,12,89,8,0,0,0,0,0,0,0,0,0,Price #2.1.1,
+,13,89,4,0,0,0,0,0,0,0,0,0,Price #1.1.1,
+,14,89,6,0,1,0,13,0,0,0,0,0,[Translate to Dansk:] Price #1.1.1,
index b65fac3..9ebcea4 100644 (file)
@@ -105,6 +105,54 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
     }
 
     /**
+     * @see DataSet/copyParentContentToLanguageKeep.csv
+     */
+    public function copyParentContentToLanguageInKeepMode()
+    {
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizationMode'] = 'keep';
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization'] = false;
+        $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization'] = false;
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+    }
+
+    /**
+     * @see DataSet/copyParentContentToLanguageWAllChildrenKeep.csv
+     */
+    public function copyParentContentToLanguageWithAllChildrenInKeepMode()
+    {
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizationMode'] = 'keep';
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true;
+        $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true;
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+    }
+
+    /**
+     * @see DataSet/copyParentContentToLanguageSelect.csv
+     */
+    public function copyParentContentToLanguageInSelectMode()
+    {
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizationMode'] = 'select';
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization'] = false;
+        $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization'] = false;
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+    }
+
+    /**
+     * @see DataSet/copyParentContentToLanguageWAllChildrenSelect.csv
+     */
+    public function copyParentContentToLanguageWithAllChildrenInSelectMode()
+    {
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizationMode'] = 'select';
+        $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true;
+        $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true;
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+    }
+
+    /**
      * @see DataSet/localizeParentContentKeep.csv
      */
     public function localizeParentContentInKeepMode()
index 220dcf1..0b19920 100644 (file)
@@ -105,6 +105,71 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\Fore
 
     /**
      * @test
+     * @see DataSet/copyParentContentToLanguageKeep.csv
+     */
+    public function copyParentContentToLanguageInKeepMode()
+    {
+        parent::copyParentContentToLanguageInKeepMode();
+        $this->assertAssertionDataSet('copyParentContentToLanguageKeep');
+
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()');
+        $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
+            ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyParentContentToLanguageWAllChildrenKeep.csv
+     */
+    public function copyParentContentToLanguageWithAllChildrenInKeepMode()
+    {
+        parent::copyParentContentToLanguageWithAllChildrenInKeepMode();
+        $this->assertAssertionDataSet('copyParentContentToLanguageWAllChildrenKeep');
+
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()');
+        $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
+            ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyParentContentToLanguageSelect.csv
+     */
+    public function copyParentContentToLanguageInSelectMode()
+    {
+        parent::copyParentContentToLanguageInSelectMode();
+        $this->assertAssertionDataSet('copyParentContentToLanguageSelect');
+
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()');
+        $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel)
+            ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyParentContentToLanguageWAllChildrenSelect.csv
+     */
+    public function copyParentContentToLanguageWithAllChildrenInSelectMode()
+    {
+        parent::copyParentContentToLanguageWithAllChildrenInSelectMode();
+        $this->assertAssertionDataSet('copyParentContentToLanguageWAllChildrenSelect');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/ExtbaseJsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()');
+        $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['localizedContentId'])->setRecordField(self::FIELD_ContentHotel)
+            ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeParentContentKeep.csv
      */
     public function localizeParentContentInKeepMode()
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageKeep.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageKeep.csv
new file mode 100644 (file)
index 0000000..db72c88
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels,,,
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,2,,,
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,1,,,
+,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,0,,,
+tx_irretutorial_1nff_hotel,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,89,1,0,0,0,0,0,0,0,0,0,Hotel #1,297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,0,0,Hotel #2,297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,0,0,Hotel #1,298,tt_content,,1
+tx_irretutorial_1nff_offer,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
+,5,89,1,0,0,0,0,0,0,0,0,0,Offer #1.1,3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,0,0,0,0,0,0,0,0,0,Offer #1.2,3,tx_irretutorial_1nff_hotel,,2
+,7,89,1,0,0,0,0,0,0,0,0,0,Offer #2.1,4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,0,0,0,0,0,0,0,0,0,Offer #1.1,5,tx_irretutorial_1nff_hotel,,1
+tx_irretutorial_1nff_price,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,
+,7,89,1,0,0,0,0,0,0,0,0,0,Price #1.1.1,5,tx_irretutorial_1nff_offer,,
+,8,89,2,0,0,0,0,0,0,0,0,0,Price #1.1.2,5,tx_irretutorial_1nff_offer,,
+,9,89,3,0,0,0,0,0,0,0,0,0,Price #1.1.3,5,tx_irretutorial_1nff_offer,,
+,10,89,1,0,0,0,0,0,0,0,0,0,Price #1.2.1,6,tx_irretutorial_1nff_offer,,
+,11,89,2,0,0,0,0,0,0,0,0,0,Price #1.2.2,6,tx_irretutorial_1nff_offer,,
+,12,89,1,0,0,0,0,0,0,0,0,0,Price #2.1.1,7,tx_irretutorial_1nff_offer,,
+,13,89,1,0,0,0,0,0,0,0,0,0,Price #1.1.1,8,tx_irretutorial_1nff_offer,,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageSelect.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageSelect.csv
new file mode 100644 (file)
index 0000000..db72c88
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels,,,
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,2,,,
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,1,,,
+,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,0,,,
+tx_irretutorial_1nff_hotel,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,89,1,0,0,0,0,0,0,0,0,0,Hotel #1,297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,0,0,Hotel #2,297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,0,0,Hotel #1,298,tt_content,,1
+tx_irretutorial_1nff_offer,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
+,5,89,1,0,0,0,0,0,0,0,0,0,Offer #1.1,3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,0,0,0,0,0,0,0,0,0,Offer #1.2,3,tx_irretutorial_1nff_hotel,,2
+,7,89,1,0,0,0,0,0,0,0,0,0,Offer #2.1,4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,0,0,0,0,0,0,0,0,0,Offer #1.1,5,tx_irretutorial_1nff_hotel,,1
+tx_irretutorial_1nff_price,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,
+,7,89,1,0,0,0,0,0,0,0,0,0,Price #1.1.1,5,tx_irretutorial_1nff_offer,,
+,8,89,2,0,0,0,0,0,0,0,0,0,Price #1.1.2,5,tx_irretutorial_1nff_offer,,
+,9,89,3,0,0,0,0,0,0,0,0,0,Price #1.1.3,5,tx_irretutorial_1nff_offer,,
+,10,89,1,0,0,0,0,0,0,0,0,0,Price #1.2.1,6,tx_irretutorial_1nff_offer,,
+,11,89,2,0,0,0,0,0,0,0,0,0,Price #1.2.2,6,tx_irretutorial_1nff_offer,,
+,12,89,1,0,0,0,0,0,0,0,0,0,Price #2.1.1,7,tx_irretutorial_1nff_offer,,
+,13,89,1,0,0,0,0,0,0,0,0,0,Price #1.1.1,8,tx_irretutorial_1nff_offer,,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageWAllChildrenKeep.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageWAllChildrenKeep.csv
new file mode 100644 (file)
index 0000000..db72c88
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels,,,
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,2,,,
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,1,,,
+,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,0,,,
+tx_irretutorial_1nff_hotel,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,89,1,0,0,0,0,0,0,0,0,0,Hotel #1,297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,0,0,Hotel #2,297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,0,0,Hotel #1,298,tt_content,,1
+tx_irretutorial_1nff_offer,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
+,5,89,1,0,0,0,0,0,0,0,0,0,Offer #1.1,3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,0,0,0,0,0,0,0,0,0,Offer #1.2,3,tx_irretutorial_1nff_hotel,,2
+,7,89,1,0,0,0,0,0,0,0,0,0,Offer #2.1,4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,0,0,0,0,0,0,0,0,0,Offer #1.1,5,tx_irretutorial_1nff_hotel,,1
+tx_irretutorial_1nff_price,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,
+,7,89,1,0,0,0,0,0,0,0,0,0,Price #1.1.1,5,tx_irretutorial_1nff_offer,,
+,8,89,2,0,0,0,0,0,0,0,0,0,Price #1.1.2,5,tx_irretutorial_1nff_offer,,
+,9,89,3,0,0,0,0,0,0,0,0,0,Price #1.1.3,5,tx_irretutorial_1nff_offer,,
+,10,89,1,0,0,0,0,0,0,0,0,0,Price #1.2.1,6,tx_irretutorial_1nff_offer,,
+,11,89,2,0,0,0,0,0,0,0,0,0,Price #1.2.2,6,tx_irretutorial_1nff_offer,,
+,12,89,1,0,0,0,0,0,0,0,0,0,Price #2.1.1,7,tx_irretutorial_1nff_offer,,
+,13,89,1,0,0,0,0,0,0,0,0,0,Price #1.1.1,8,tx_irretutorial_1nff_offer,,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageWAllChildrenSelect.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageWAllChildrenSelect.csv
new file mode 100644 (file)
index 0000000..6c3a11b
--- /dev/null
@@ -0,0 +1,28 @@
+tt_content,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels,,,
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,2,,,
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,1,,,
+,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,1,,,
+tx_irretutorial_1nff_hotel,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,89,512,0,0,0,0,0,0,0,0,0,Hotel #1,297,tt_content,,2
+,4,89,1280,0,0,0,0,0,0,0,0,0,Hotel #2,297,tt_content,,1
+,5,89,768,0,0,0,0,0,0,0,0,0,Hotel #1,298,tt_content,,1
+,6,89,1,0,1,0,5,0,0,0,0,0,[Translate to Dansk:] Hotel #1,299,tt_content,,1
+tx_irretutorial_1nff_offer,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
+,5,89,512,0,0,0,0,0,0,0,0,0,Offer #1.1,3,tx_irretutorial_1nff_hotel,,3
+,6,89,1536,0,0,0,0,0,0,0,0,0,Offer #1.2,3,tx_irretutorial_1nff_hotel,,2
+,7,89,768,0,0,0,0,0,0,0,0,0,Offer #2.1,4,tx_irretutorial_1nff_hotel,,1
+,8,89,1024,0,0,0,0,0,0,0,0,0,Offer #1.1,5,tx_irretutorial_1nff_hotel,,1
+,9,89,1,0,1,0,8,0,0,0,0,0,[Translate to Dansk:] Offer #1.1,6,tx_irretutorial_1nff_hotel,,1
+tx_irretutorial_1nff_price,,,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,
+,7,89,512,0,0,0,0,0,0,0,0,0,Price #1.1.1,5,tx_irretutorial_1nff_offer,,
+,8,89,1792,0,0,0,0,0,0,0,0,0,Price #1.1.2,5,tx_irretutorial_1nff_offer,,
+,9,89,2304,0,0,0,0,0,0,0,0,0,Price #1.1.3,5,tx_irretutorial_1nff_offer,,
+,10,89,768,0,0,0,0,0,0,0,0,0,Price #1.2.1,6,tx_irretutorial_1nff_offer,,
+,11,89,2048,0,0,0,0,0,0,0,0,0,Price #1.2.2,6,tx_irretutorial_1nff_offer,,
+,12,89,1024,0,0,0,0,0,0,0,0,0,Price #2.1.1,7,tx_irretutorial_1nff_offer,,
+,13,89,1280,0,0,0,0,0,0,0,0,0,Price #1.1.1,8,tx_irretutorial_1nff_offer,,
+,14,89,1,0,1,0,13,0,0,0,0,0,[Translate to Dansk:] Price #1.1.1,9,tx_irretutorial_1nff_offer,,
index 87841ca..ca3930a 100644 (file)
@@ -151,6 +151,24 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguageOfRelation.csv
+     */
+    public function copyContentToLanguageOfRelation()
+    {
+        $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyCategoryToLanguageOfRelation.csv
+     */
+    public function copyCategoryToLanguageOfRelation()
+    {
+        $this->actionService->copyRecordToLanguage(self::TABLE_Category, self::VALUE_CategoryIdFirst, self::VALUE_LanguageId);
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentRecordOfCategoryRelation.csv
      */
     public function localizeContentOfRelation()
index 42591cb..4d4f067 100644 (file)
@@ -183,6 +183,37 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\ManyToMan
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguageOfRelation.csv
+     */
+    public function copyContentToLanguageOfRelation()
+    {
+        parent::copyContentToLanguageOfRelation();
+        $this->assertAssertionDataSet('copyContentToLanguageOfRelation');
+
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField('categories')
+            ->setTable(self::TABLE_Category)->setField('title')->setValues('Category B', 'Category C'));
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyCategoryToLanguageOfRelation.csv
+     */
+    public function copyCategoryToLanguageOfRelation()
+    {
+        parent::copyCategoryToLanguageOfRelation();
+        $this->assertAssertionDataSet('copyCategoryToLanguageOfRelation');
+        //in this case the translated element is orphaned (no CE with relation to it, and it has no l10n_parent)
+        //so on frontend there is no change.
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField('categories')
+            ->setTable(self::TABLE_Category)->setField('title')->setValues('Category A', 'Category B'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentRecordOfCategoryRelation.csv
      */
     public function localizeContentOfRelation()
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/DataSet/copyCategoryToLanguageOfRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/DataSet/copyCategoryToLanguageOfRelation.csv
new file mode 100644 (file)
index 0000000..cbe0c09
--- /dev/null
@@ -0,0 +1,18 @@
+sys_category,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,0,Category A,0,0
+,29,0,512,0,0,0,0,0,0,0,0,0,Category B,0,0
+,30,0,768,0,0,0,0,0,0,0,0,0,Category C,0,0
+,31,0,1024,0,0,0,0,0,0,0,0,0,Category A.A,28,0
+,32,0,384,0,1,0,28,0,0,0,0,0,[Translate to Dansk:] Category A,0,1
+sys_category_record_mm,,,,,,,,,,,,,,,
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname,,,,,,,,,
+,28,297,tt_content,0,1,categories,,,,,,,,,
+,29,297,tt_content,0,2,categories,,,,,,,,,
+,29,298,tt_content,0,1,categories,,,,,,,,,
+,30,298,tt_content,0,2,categories,,,,,,,,,
+,32,297,tt_content,1,0,categories,,,,,,,,,
+tt_content,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,0,2
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,0,2
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/DataSet/copyContentToLanguageOfRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/DataSet/copyContentToLanguageOfRelation.csv
new file mode 100644 (file)
index 0000000..ee791d7
--- /dev/null
@@ -0,0 +1,19 @@
+sys_category,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,0,Category A,0,0
+,29,0,512,0,0,0,0,0,0,0,0,0,Category B,0,0
+,30,0,768,0,0,0,0,0,0,0,0,0,Category C,0,0
+,31,0,1024,0,0,0,0,0,0,0,0,0,Category A.A,28,0
+sys_category_record_mm,,,,,,,,,,,,,,,
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname,,,,,,,,,
+,28,297,tt_content,0,1,categories,,,,,,,,,
+,29,297,tt_content,0,2,categories,,,,,,,,,
+,29,298,tt_content,0,1,categories,,,,,,,,,
+,30,298,tt_content,0,2,categories,,,,,,,,,
+,29,299,tt_content,0,1,categories,,,,,,,,,
+,30,299,tt_content,0,2,categories,,,,,,,,,
+tt_content,,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,0,2
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,0,2
+,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,0,2
index f73bbcc..1e8aae1 100644 (file)
@@ -101,6 +101,15 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguage.csv
+     */
+    public function copyContentToLanguage()
+    {
+        $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_LanguageId);
+    }
+
+    /**
+     * @test
      * @see DataSet/copyPasteContent.csv
      */
     public function copyPasteContent()
index d40c107..d2ec7ff 100644 (file)
@@ -102,6 +102,24 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\A
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguage.csv
+     */
+    public function copyContentToLanguage()
+    {
+        parent::copyContentToLanguage();
+        $this->assertAssertionDataSet('copyContentToLanguage');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Regular Element #3', '[Translate to Dansk:] Regular Element #2'));
+    }
+
+    /**
+     * @test
      * @see DataSet/copyContentRecord.csv
      */
     public function copyPasteContent()
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguage.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguage.csv
new file mode 100644 (file)
index 0000000..aed7e6b
--- /dev/null
@@ -0,0 +1,7 @@
+tt_content,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2
+,299,89,768,0,0,0,0,0,0,0,0,0,Regular Element #3
+,300,89,1024,0,1,299,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,89,640,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2
index 9e83e83..554063e 100644 (file)
@@ -189,6 +189,26 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguageOfRelation.csv
+     */
+    public function copyContentToLanguageOfRelation()
+    {
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyElementToLanguageOfRelation.csv
+     */
+    public function copyElementToLanguageOfRelation()
+    {
+        $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Element, self::VALUE_ElementIdFirst, self::VALUE_LanguageId);
+        $this->recordIds['localizedElementId'] = $newTableIds[self::TABLE_Element][self::VALUE_ElementIdFirst];
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentOfRelation.csv
      */
     public function localizeContentOfRelation()
index fe4cb68..e5a7d0a 100644 (file)
@@ -236,6 +236,38 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\Select\Ab
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguageOfRelation.csv
+     */
+    public function copyContentToLanguageOfRelation()
+    {
+        parent::copyContentToLanguageOfRelation();
+        $this->assertAssertionDataSet('copyContentToLanguageOfRelation');
+
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentElement)
+            ->setTable(self::TABLE_Element)->setField('title')->setValues('Element #2', 'Element #3'));
+    }
+
+    /**
+     * @test
+     * @see DataSet/copyElementToLanguageOfRelation.csv
+     */
+    public function copyElementToLanguageOfRelation()
+    {
+        parent::copyElementToLanguageOfRelation();
+        $this->assertAssertionDataSet('copyElementToLanguageOfRelation');
+
+        //in this case the translated element is orphaned (no CE with relation to it, and it has no l10n_parent)
+        //so on frontend there is no change.
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()
+            ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentElement)
+            ->setTable(self::TABLE_Element)->setField('title')->setValues('Element #1', 'Element #2'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentOfRelation.csv
      */
     public function localizeContentOfRelation()
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/DataSet/copyContentToLanguageOfRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/DataSet/copyContentToLanguageOfRelation.csv
new file mode 100644 (file)
index 0000000..a4083d8
--- /dev/null
@@ -0,0 +1,16 @@
+pages,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,,,
+,1,0,256,0,0,0,0,0,0,0,FunctionalTest,,,
+,88,1,256,0,0,0,0,0,0,0,DataHandlerTest,,,
+,89,88,256,0,0,0,0,0,0,0,Relations,,,
+,90,88,512,0,0,0,0,0,0,0,Target,,,
+tt_content,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_testdatahandler_select
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,"1,2"
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,"2,3"
+,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,"2,3"
+tx_testdatahandler_element,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,
+,1,89,256,0,0,0,0,0,0,0,0,0,Element #1,
+,2,89,512,0,0,0,0,0,0,0,0,0,Element #2,
+,3,89,768,0,0,0,0,0,0,0,0,0,Element #3,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/DataSet/copyElementToLanguageOfRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/DataSet/copyElementToLanguageOfRelation.csv
new file mode 100644 (file)
index 0000000..5c73dd0
--- /dev/null
@@ -0,0 +1,16 @@
+pages,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,,,
+,1,0,256,0,0,0,0,0,0,0,FunctionalTest,,,
+,88,1,256,0,0,0,0,0,0,0,DataHandlerTest,,,
+,89,88,256,0,0,0,0,0,0,0,Relations,,,
+,90,88,512,0,0,0,0,0,0,0,Target,,,
+tt_content,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_testdatahandler_select
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,"1,2"
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,"2,3"
+tx_testdatahandler_element,,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,
+,1,89,256,0,0,0,0,0,0,0,0,0,Element #1,
+,2,89,512,0,0,0,0,0,0,0,0,0,Element #2,
+,3,89,768,0,0,0,0,0,0,0,0,0,Element #3,
+,4,89,384,0,1,0,1,0,0,0,0,0,[Translate to Dansk:] Element #1,
diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts b/typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts
new file mode 100644 (file)
index 0000000..ea34270
--- /dev/null
@@ -0,0 +1,3 @@
+config {
+       sys_language_overlay = 0
+}
\ No newline at end of file
index 22b5d4a..370a2fa 100644 (file)
@@ -137,6 +137,15 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
     }
 
     /**
+     * @see DataSet/copyContentToLanguage.csv
+     */
+    public function copyContentToLanguage()
+    {
+        $copiedTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdSecond, self::VALUE_LanguageId);
+        $this->recordIds['localizedContentId'] = $copiedTableIds[self::TABLE_Content][self::VALUE_ContentIdSecond];
+    }
+
+    /**
      * @see DataSet/localizeContentRecord.csv
      */
     public function localizeContent()
index 34dead1..a271ada 100644 (file)
@@ -132,6 +132,24 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguage.csv
+     */
+    public function copyContentToLanguage()
+    {
+        parent::copyContentToLanguage();
+        $this->assertAssertionDataSet('copyContentToLanguage');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Regular Element #3', '[Translate to Dansk:] Regular Element #2'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentRecord.csv
      */
     public function localizeContent()
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContentToLanguage.csv
new file mode 100644 (file)
index 0000000..bed6fe3
--- /dev/null
@@ -0,0 +1,10 @@
+tt_content,,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,296,88,256,0,0,0,0,0,0,0,0,0,Regular Element #0
+,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1
+,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2
+,299,89,768,0,0,0,0,0,0,0,0,0,Regular Element #3
+,300,89,1024,0,1,299,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,-1,512,0,0,0,298,2,2,0,298,0,Regular Element #2
+,302,89,640,0,1,0,298,1,1,0,0,0,[Translate to Dansk:] Regular Element #2
+,303,-1,640,0,1,0,298,1,-1,0,302,0,[Translate to Dansk:] Regular Element #2
index f5c73e5..6952127 100644 (file)
@@ -150,6 +150,25 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguage.csv
+     */
+    public function copyContentToLanguage()
+    {
+        parent::copyContentToLanguage();
+        $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
+        $this->assertAssertionDataSet('copyContentToLanguage');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Regular Element #3', '[Translate to Dansk:] Regular Element #2'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentRecord.csv
      */
     public function localizeContent()
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/DataSet/copyContentToLanguage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/DataSet/copyContentToLanguage.csv
new file mode 100644 (file)
index 0000000..5a9a18d
--- /dev/null
@@ -0,0 +1,9 @@
+tt_content,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,296,88,256,0,0,0,0,0,0,0,0,Regular Element #0
+,297,89,256,0,0,0,0,0,0,0,0,Regular Element #1
+,298,89,512,0,0,0,0,0,0,0,0,Regular Element #2
+,299,89,768,0,0,0,0,0,0,0,0,Regular Element #3
+,300,89,1024,0,1,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,-1,512,0,0,0,2,2,0,298,0,Regular Element #2
+,302,89,640,0,1,0,0,0,0,0,0,[Translate to Dansk:] Regular Element #2
index 65a0786..065c5ca 100644 (file)
@@ -139,6 +139,25 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
 
     /**
      * @test
+     * @see DataSet/copyContentToLanguage.csv
+     */
+    public function copyContentToLanguage()
+    {
+        parent::copyContentToLanguage();
+        $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+        $this->assertAssertionDataSet('copyContentToLanguage');
+
+        $this->setUpFrontendRootPage(1, [
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts',
+            'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts'
+        ]);
+        $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections();
+        $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
+            ->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Regular Element #3', '[Translate to Dansk:] Regular Element #2'));
+    }
+
+    /**
+     * @test
      * @see DataSet/localizeContentRecord.csv
      */
     public function localizeContent()
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/DataSet/copyContentToLanguage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/DataSet/copyContentToLanguage.csv
new file mode 100644 (file)
index 0000000..5a9a18d
--- /dev/null
@@ -0,0 +1,9 @@
+tt_content,,,,,,,,,,,,
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,296,88,256,0,0,0,0,0,0,0,0,Regular Element #0
+,297,89,256,0,0,0,0,0,0,0,0,Regular Element #1
+,298,89,512,0,0,0,0,0,0,0,0,Regular Element #2
+,299,89,768,0,0,0,0,0,0,0,0,Regular Element #3
+,300,89,1024,0,1,299,0,0,0,0,0,[Translate to Dansk:] Regular Element #3
+,301,-1,512,0,0,0,2,2,0,298,0,Regular Element #2
+,302,89,640,0,1,0,0,0,0,0,0,[Translate to Dansk:] Regular Element #2