[TASK] Cleanup DataHandler functional tests 77/30177/3
authorOliver Hader <oliver@typo3.org>
Fri, 16 May 2014 12:27:29 +0000 (14:27 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 16 May 2014 19:43:31 +0000 (21:43 +0200)
Some DataHandler functional test cases are duplicated or are not
required anymore. Here's a list of what has changed and moved
into some existing testing structure:

Core:
* DataHandlerTest::canCreateTtContent
** Regular\Modify\ActionTest::createContents
* DataHandlerTest::canLocalizeTtContent
** Regular\Modify\ActionTest::localizeContent
* DataHandlerTest::canCopyPasteTtContent
** Regular\Modify\ActionTest::copyPasteContent
* DataHandlerTest::canCutPasteTtContent
** Regular\Modify\ActionTest::movePasteContentToDifferentPage
* IRRE\MtoNMMAsymetricLocalizationKeepTest::*
** IRRE\CSV\Modify\ActionTest::localizeParentContent*
** IRRE\ForeignField\Modify\ActionTest::localizeParentContent*
* IRRE\MtoNMMAsymetricLocalizationSelectTest::*
** IRRE\CSV\Modify\ActionTest::localizeParentContent*
** IRRE\ForeignField\Modify\ActionTest::localizeParentContent*

Workspaces:
* IRRE\MToNMMTest::*
** ManyToMany\Modify\ActionTest::*
** ManyToMany\Publish\ActionTest::*
** ManyToMany\PublishAll\ActionTest::*
* IRRE\OneToNCSVTest::*
** IRRE\CSV\Modify\ActionTest::*
** IRRE\CSV\Publish\ActionTest::*
** IRRE\CSV\PublishAll\ActionTest::*
* IRRE\OneToNForeignFieldTest::*
** IRRE\ForeignField\Modify\ActionTest::*
** IRRE\ForeignField\Publish\ActionTest::*
** IRRE\ForeignField\PublishAll\ActionTest::*

Resolves: #58870
Releases: 6.2
Change-Id: I0c75fcf826d05f8515a5609cb00c153992ba7b44
Reviewed-on: https://review.typo3.org/30177
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
82 files changed:
typo3/sysext/core/Tests/Functional/DataHandling/DataHandlerTest.php [deleted file]
typo3/sysext/core/Tests/Functional/DataHandling/Framework/ActionService.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/AbstractLocalizationTestCase.php [deleted file]
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/localizeParentContent.csv [deleted file]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentKeep.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentSelect.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildrenKeep.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildrenSelect.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/Fixtures/MToNMMAsymmetric.xml [deleted file]
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/localizeParentContent.csv [deleted file]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentKeep.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentSelect.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenKeep.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenSelect.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/MToNMMAsymmetricLocalizationKeepTest.php [deleted file]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/MToNMMAsymmetricLocalizationSelectTest.php [deleted file]
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/changeContentSorting.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyContent.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyPage.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyPasteContent.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/createContents.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/deleteContent.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/deletePage.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/localizeContent.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/localizePage.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/modifyContent.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/moveContentToDifferentPage.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/moveContentToDifferentPageNChangeSorting.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/movePageToDifferentPage.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/movePageToDifferentPageNChangeSorting.csv
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/movePasteContentToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/AbstractOneToNTestCase.php [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/AbstractTestCase.php [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContent.csv [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildrenKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildrenSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContent.csv [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentWAllChildrenKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentWAllChildrenSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContent.csv [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentWAllChildrenKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentWAllChildrenSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/Fixtures/OneToNCSV.xml [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/Fixtures/OneToNForeignField.xml [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContent.csv [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContent.csv [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildrenKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildrenSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContent.csv [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildrenKeep.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildrenSelect.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/MToNMMTest.php [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/OneToNCSVTest.php [deleted file]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/OneToNForeignFieldTest.php [deleted file]

diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/DataHandlerTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/DataHandlerTest.php
deleted file mode 100644 (file)
index 5a585a5..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests\Functional\DataHandling;
-
-/***************************************************************
- * Copyright notice
- *
- * (c) 2013 Tymoteusz Motylewski <t.motylewski@gmail.com>
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-use TYPO3\CMS\Core\Database\DatabaseConnection;
-use TYPO3\CMS\Core\DataHandling\DataHandler;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Functional test for the DataHandler
- */
-class DataHandlerTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
-
-       public function setUp() {
-               parent::setUp();
-
-               /** @var $backendUser \TYPO3\CMS\Core\Authentication\BackendUserAuthentication */
-               $backendUser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
-               $backendUser->user['admin'] = 1;
-               $backendUser->user['uid'] = 1;
-               // By default make tests on live workspace
-               $backendUser->workspace = 0;
-               $GLOBALS['BE_USER'] = $backendUser;
-               \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
-               $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
-       }
-
-       /**
-        * @test
-        */
-       public function canCreateTtContent() {
-               $dataHandler = $this->getDataHandler();
-
-               $temporaryId = uniqid('NEW');
-               $dataArray = array(
-                       'tt_content' => array(
-                               $temporaryId => array(
-                                       'pid' => 1,
-                                       'header' => "Test Title",
-                               )
-                       )
-               );
-
-               $dataHandler->start($dataArray, array());
-               $dataHandler->process_datamap();
-               $uid = $dataHandler->substNEWwithIDs[$temporaryId];
-
-               $this->assertGreaterThanOrEqual(1, $uid);
-
-               $database = $this->getDatabaseConnection();
-               $row = $database->exec_SELECTgetSingleRow('*', 'tt_content', 'uid = ' . $uid);
-               $this->assertNotEmpty($row);
-
-               $this->assertEquals($dataArray['tt_content'][$temporaryId]['pid'], $row['pid']);
-               $this->assertEquals($dataArray['tt_content'][$temporaryId]['header'], $row['header']);
-               $this->assertEquals($uid, $row['uid']);
-       }
-
-       /**
-        * @test
-        */
-       public function canLocalizeTtContent() {
-               $this->importDataSet(__DIR__. '/../Fixtures/sys_language.xml');
-               $this->importDataSet(__DIR__ . '/../Fixtures/pages_language_overlay.xml');
-               $this->importDataSet(__DIR__ . '/../Fixtures/tt_content.xml');
-
-               $dataHandler = $this->getDataHandler();
-               $originalRecordId  = 1;
-               $languageRecordUid = 1;
-
-               $commandMap = array(
-                       'tt_content' => array(
-                               $originalRecordId => array(
-                                       'localize' => $languageRecordUid
-                               )
-                       )
-               );
-
-               $dataHandler->start(array(), $commandMap);
-               $dataHandler->process_cmdmap();
-               $uid = $dataHandler->copyMappingArray_merged['tt_content'][$originalRecordId];
-               $this->assertGreaterThanOrEqual(2, $uid);
-
-               $database = $this->getDatabaseConnection();
-               $row = $database->exec_SELECTgetSingleRow('*', 'tt_content', 'uid = ' . $uid);
-               $this->assertNotEmpty($row);
-
-               $this->assertEquals(1, $row['pid']);
-               $this->assertContains('Test content', $row['header']);
-               $this->assertEquals($uid, $row['uid']);
-               $this->assertEquals(1, $row['l18n_parent']);
-       }
-
-       /**
-        * @test
-        */
-       public function canCopyPasteTtContent() {
-               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/tt_content.xml');
-               $database = $this->getDatabaseConnection();
-
-               $dataHandler = $this->getDataHandler();
-               $originalRecordId  = 1;
-               $originalRecord = $database->exec_SELECTgetSingleRow('*', 'tt_content', 'uid = ' . $originalRecordId);
-               $targetPage = 2;
-               $targetColumn = 3;
-
-               $commandMap = array(
-                       'tt_content' => array(
-                               $originalRecordId => array(
-                                       'copy' => array(
-                                               'action' => 'paste',
-                                               'target' => $targetPage,
-                                               'update' => array(
-                                                       'colPos' => $targetColumn
-                                               )
-                                       ),
-                               )
-                       )
-               );
-
-               $dataHandler->start(array(), $commandMap);
-               $dataHandler->process_cmdmap();
-
-               $rows = $database->exec_SELECTgetRows('*', 'tt_content', '1=1');
-
-               // Check whether there are exactly two records now
-               $rowCount = $database->exec_SELECTcountRows('*', 'tt_content', '1=1');
-               $this->assertEquals(2, $rowCount);
-
-               // Retrieve the UID of the copied record. Should be 2 (auto_increment)
-               $uid = $dataHandler->copyMappingArray_merged['tt_content'][$originalRecordId];
-               $this->assertGreaterThanOrEqual(2, $uid);
-
-               // Retrieve copied record
-               $row = $database->exec_SELECTgetSingleRow('*', 'tt_content', 'uid = ' . $uid);
-               $this->assertNotEmpty($row);
-
-               // Check whether the copy&pasted record is at expected page and column
-               $this->assertEquals($targetPage, $row['pid']);
-               $this->assertEquals($targetColumn, $row['colPos']);
-
-               // Check whether original record has not changed
-               $checkRecord = $database->exec_SELECTgetSingleRow('*', 'tt_content', 'uid = ' . $originalRecordId);
-               $this->assertEquals($checkRecord, $originalRecord);
-       }
-
-       /**
-        * @test
-        */
-       public function canCutPasteTtContent() {
-               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/tt_content.xml');
-               $database = $this->getDatabaseConnection();
-
-               $dataHandler = $this->getDataHandler();
-               $originalRecordId  = 1;
-               $targetPage = 2;
-               $targetColumn = 3;
-
-               $commandMap = array(
-                       'tt_content' => array(
-                               $originalRecordId => array(
-                                       'move' => array(
-                                               'action' => 'paste',
-                                               'target' => $targetPage,
-                                               'update' => array(
-                                                       'colPos' => $targetColumn
-                                               )
-                                       ),
-                               )
-                       )
-               );
-
-               $dataHandler->start(array(), $commandMap);
-               $dataHandler->process_cmdmap();
-
-               $row = $database->exec_SELECTgetSingleRow('*', 'tt_content', 'uid = ' . $originalRecordId);
-               $this->assertNotEmpty($row);
-
-               // Check whether the pasted record is at expected page and column
-               $this->assertEquals($targetPage, $row['pid']);
-               $this->assertEquals($targetColumn, $row['colPos']);
-
-               // Check whether this was the only existing record
-               $rowCount = $database->exec_SELECTcountRows('*', 'tt_content', '1=1');
-               $this->assertEquals(1, $rowCount);
-       }
-
-       /**
-        * @return \TYPO3\CMS\Core\DataHandling\DataHandler
-        */
-       protected function getDataHandler() {
-               $dataHandler = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
-               return $dataHandler;
-       }
-}
index afe5f7d..2e016eb 100644 (file)
@@ -227,9 +227,10 @@ class ActionService {
         * @param string $tableName
         * @param integer $uid
         * @param integer $pageId
+        * @param NULL|array $recordData
         * @return array
         */
-       public function copyRecord($tableName, $uid, $pageId) {
+       public function copyRecord($tableName, $uid, $pageId, array $recordData = NULL) {
                $commandMap = array(
                        $tableName => array(
                                $uid => array(
@@ -237,6 +238,13 @@ class ActionService {
                                ),
                        ),
                );
+               if ($recordData !== NULL) {
+                       $commandMap[$tableName][$uid]['copy'] = array(
+                               'action' => 'paste',
+                               'target' => $pageId,
+                               'update' => $recordData,
+                       );
+               }
                $this->createDataHandler();
                $this->dataHandler->start(array(), $commandMap);
                $this->dataHandler->process_cmdmap();
@@ -247,8 +255,9 @@ class ActionService {
         * @param string $tableName
         * @param integer $uid
         * @param integer $pageId
+        * @param NULL|array $recordData
         */
-       public function moveRecord($tableName, $uid, $pageId) {
+       public function moveRecord($tableName, $uid, $pageId, array $recordData = NULL) {
                $commandMap = array(
                        $tableName => array(
                                $uid => array(
@@ -256,6 +265,13 @@ class ActionService {
                                ),
                        ),
                );
+               if ($recordData !== NULL) {
+                       $commandMap[$tableName][$uid]['move'] = array(
+                               'action' => 'paste',
+                               'target' => $pageId,
+                               'update' => $recordData,
+                       );
+               }
                $this->createDataHandler();
                $this->dataHandler->start(array(), $commandMap);
                $this->dataHandler->process_cmdmap();
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/AbstractLocalizationTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/AbstractLocalizationTestCase.php
deleted file mode 100644 (file)
index 86b0529..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE;
-
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Oliver Hader <oliver@typo3.org>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-require_once(dirname(__FILE__). '/AbstractTestCase.php');
-
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Generic test helpers for localization tests
- *
- */
-abstract class AbstractLocalizationTestCase extends AbstractTestCase {
-       const COMMAND_LocalizeSynchronize = 'inlineLocalizeSynchronize';
-       const COMMAND_LocalizeSynchronize_Localize = 'localize';
-       const COMMAND_LocalizeSynchronize_Synchronize = 'synchronize';
-
-       const VALUE_LocalizationMode_Keep = 'keep';
-       const VALUE_LocalizationMode_Select = 'select';
-
-       const TABLE_Hotel = 'tx_irretutorial_mnmmasym_hotel';
-       const TABLE_Offer = 'tx_irretutorial_mnmmasym_offer';
-       const TABLE_Price = 'tx_irretutorial_mnmmasym_price';
-       const TABLE_Relation_Hotel_Offer = 'tx_irretutorial_mnmmasym_hotel_offer_rel';
-       const TABLE_Relation_Offer_Price = 'tx_irretutorial_mnmmasym_offer_price_rel';
-
-       const FIELD_Hotel_Offers = 'offers';
-       const FIELD_Offer_Hotels = 'hotels';
-       const FIELD_Offer_Prices = 'prices';
-       const FIELD_Price_Offers = 'offers';
-
-       /**
-        * @var array
-        */
-       protected $structure = array(
-               self::TABLE_Hotel => array(self::FIELD_Hotel_Offers),
-               self::TABLE_Offer => array(self::FIELD_Offer_Hotels, self::FIELD_Offer_Prices),
-               self::TABLE_Price => array(self::FIELD_Price_Offers),
-       );
-
-       /**
-        * Asserts that accordant localizations exist.
-        *
-        * @param array $tables Table names with list of ids to be edited
-        * @param integer $languageId The sys_language_id
-        * @param boolean $expected Expected result of assertion
-        * @return void
-        */
-       protected function assertLocalizations(array $tables, $languageId = self::VALUE_LanguageId, $expected = TRUE) {
-               foreach ($tables as $tableName => $idList) {
-                       $ids = GeneralUtility::trimExplode(',', $idList, TRUE);
-                       foreach ($ids as $id) {
-                               $localization = BackendUtility::getRecordLocalization($tableName, $id, $languageId);
-                               $isLocalization = is_array($localization) && count($localization);
-                               $this->assertTrue(
-                                       !($expected XOR $isLocalization),
-                                       'Localization for ' . $tableName . ':' . $id . ($expected ? ' not' : '') . ' available'
-                               );
-                       }
-               }
-       }
-
-       /**
-        * Gets the id of the localized record of a language parent.
-        *
-        * @param string $tableName
-        * @param integer $id
-        * @param integer $languageId
-        * @return boolean
-        */
-       protected function getLocalizationId($tableName, $id, $languageId = self::VALUE_LanguageId) {
-               $localization = BackendUtility::getRecordLocalization($tableName, $id, $languageId);
-               if (is_array($localization) && count($localization)) {
-                       return $localization[0]['uid'];
-               }
-
-               return FALSE;
-       }
-}
index f4a16cd..ba8a9b4 100644 (file)
@@ -68,7 +68,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
         */
 
        /**
-        * @test
         * @see DataSet/Assertion/createParentContentRecord.csv
         */
        public function createParentContent() {
@@ -76,7 +75,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyParentContentRecord.csv
         */
        public function modifyParentContent() {
@@ -84,7 +82,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/deleteParentContentRecord.csv
         */
        public function deleteParentContent() {
@@ -92,7 +89,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/copyParentContentRecord.csv
         */
        public function copyParentContent() {
@@ -109,15 +105,50 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
-               $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+       public function localizeParentContentInKeepMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/changeParentContentRecordSorting.csv
         */
        public function changeParentContentSorting() {
@@ -125,7 +156,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/moveParentContentRecordToDifferentPage.csv
         */
        public function moveParentContentToDifferentPage() {
@@ -133,7 +163,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/moveParentContentRecordToDifferentPageAndChangeSorting.csv
         */
        public function moveParentContentToDifferentPageAndChangeSorting() {
@@ -146,7 +175,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
         */
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyPageRecord.csv
         */
        public function modifyPage() {
@@ -154,7 +182,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/deletePageRecord.csv
         */
        public function deletePage() {
@@ -162,7 +189,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/copyPageRecord.csv
         */
        public function copyPage() {
@@ -171,7 +197,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/copyPageWHotelBeforeParentContent.csv
         */
        public function copyPageWithHotelBeforeParentContent() {
@@ -190,7 +215,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
         */
 
        /**
-        * @test
         * @see DataSet/Assertion/createParentContentRecordWithHotelAndOfferChildRecords.csv
         */
        public function createParentContentWithHotelAndOfferChildren() {
@@ -206,7 +230,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/createAndCopyParentContentRecordWithHotelAndOfferChildRecords.csv
         */
        public function createAndCopyParentContentWithHotelAndOfferChildren() {
@@ -226,7 +249,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/createAndLocalizeParentContentRecordWithHotelAndOfferChildRecords.csv
         */
        public function createAndLocalizeParentContentWithHotelAndOfferChildren() {
@@ -245,7 +267,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyOnlyHotelChildRecord.csv
         */
        public function modifyOnlyHotelChild() {
@@ -253,7 +274,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyParentRecordAndChangeHotelChildRecordsSorting.csv
         */
        public function modifyParentAndChangeHotelChildrenSorting() {
@@ -261,7 +281,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyParentRecordWithHotelChildRecord.csv
         */
        public function modifyParentWithHotelChild() {
@@ -275,7 +294,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyParentRecordAndAddHotelChildRecord.csv
         */
        public function modifyParentAndAddHotelChild() {
@@ -289,7 +307,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyParentRecordAndDeleteHotelChildRecord.csv
         */
        public function modifyParentAndDeleteHotelChild() {
index 458af32..2661f97 100644 (file)
@@ -112,11 +112,56 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\
 
        /**
         * @test
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
-               parent::localizeParentContent();
-               $this->assertAssertionDataSet('localizeParentContent');
+       public function localizeParentContentInKeepMode() {
+               parent::localizeParentContentInKeepMode();
+               $this->assertAssertionDataSet('localizeParentContentKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               parent::localizeParentContentWithAllChildrenInKeepMode();
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               parent::localizeParentContentInSelectMode();
+               $this->assertAssertionDataSet('localizeParentContentSelect');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               parent::localizeParentContentWithAllChildrenInSelectMode();
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
 
                $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
                $this->assertResponseContentStructureHasRecords(
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContent.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContent.csv
deleted file mode 100644 (file)
index 888a11b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
-,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
-,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
-,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
-,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
-,6,89,96,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
-,5,89,256,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,"Offer #1.2","10,11"
-,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
-,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
-,9,89,48,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
-,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
-,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
-,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
-,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
-,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
-,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
-,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
-,14,89,6,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1"
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentKeep.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentKeep.csv
new file mode 100644 (file)
index 0000000..b52503d
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,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/localizeParentContentSelect.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentSelect.csv
new file mode 100644 (file)
index 0000000..b52503d
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,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/localizeParentContentWAllChildrenKeep.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildrenKeep.csv
new file mode 100644 (file)
index 0000000..b52503d
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,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/localizeParentContentWAllChildrenSelect.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildrenSelect.csv
new file mode 100644 (file)
index 0000000..888a11b
--- /dev/null
@@ -0,0 +1,28 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+,6,89,96,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
+,9,89,48,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,14,89,6,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1"
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/Fixtures/MToNMMAsymmetric.xml b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/Fixtures/MToNMMAsymmetric.xml
deleted file mode 100644 (file)
index 9c5655f..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<dataset>
-       <!-- Tabelle tx_irretutorial_mnmmasym_hotel -->
-       <tx_irretutorial_mnmmasym_hotel>
-               <uid>1</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>256</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Rosengarten Hotels Appartment</title>
-               <offers>2</offers>
-       </tx_irretutorial_mnmmasym_hotel>
-       <!-- Tabelle tx_irretutorial_mnmmasym_hotel_offer_rel -->
-       <tx_irretutorial_mnmmasym_hotel_offer_rel>
-               <uid>1</uid>
-               <uid_local>1</uid_local>
-               <uid_foreign>1</uid_foreign>
-               <tablenames></tablenames>
-               <sorting>1</sorting>
-               <sorting_foreign>0</sorting_foreign>
-               <ident></ident>
-       </tx_irretutorial_mnmmasym_hotel_offer_rel>
-       <tx_irretutorial_mnmmasym_hotel_offer_rel>
-               <uid>2</uid>
-               <uid_local>1</uid_local>
-               <uid_foreign>2</uid_foreign>
-               <tablenames></tablenames>
-               <sorting>2</sorting>
-               <sorting_foreign>0</sorting_foreign>
-               <ident></ident>
-       </tx_irretutorial_mnmmasym_hotel_offer_rel>
-       <!-- Tabelle tx_irretutorial_mnmmasym_offer -->
-       <tx_irretutorial_mnmmasym_offer>
-               <uid>1</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>256</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Wellness &amp; Beauty Week</title>
-               <hotels>0</hotels>
-               <prices>1</prices>
-       </tx_irretutorial_mnmmasym_offer>
-       <tx_irretutorial_mnmmasym_offer>
-               <uid>2</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>128</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>&quot;Experience it&quot; Week</title>
-               <hotels>0</hotels>
-               <prices>2</prices>
-       </tx_irretutorial_mnmmasym_offer>
-       <!-- Tabelle tx_irretutorial_mnmmasym_offer_price_rel -->
-       <tx_irretutorial_mnmmasym_offer_price_rel>
-               <uid>1</uid>
-               <uid_local>2</uid_local>
-               <uid_foreign>2</uid_foreign>
-               <tablenames></tablenames>
-               <sorting>1</sorting>
-               <sorting_foreign>0</sorting_foreign>
-               <ident></ident>
-       </tx_irretutorial_mnmmasym_offer_price_rel>
-       <tx_irretutorial_mnmmasym_offer_price_rel>
-               <uid>2</uid>
-               <uid_local>2</uid_local>
-               <uid_foreign>3</uid_foreign>
-               <tablenames></tablenames>
-               <sorting>2</sorting>
-               <sorting_foreign>0</sorting_foreign>
-               <ident></ident>
-       </tx_irretutorial_mnmmasym_offer_price_rel>
-       <tx_irretutorial_mnmmasym_offer_price_rel>
-               <uid>3</uid>
-               <uid_local>1</uid_local>
-               <uid_foreign>1</uid_foreign>
-               <tablenames></tablenames>
-               <sorting>1</sorting>
-               <sorting_foreign>0</sorting_foreign>
-               <ident></ident>
-       </tx_irretutorial_mnmmasym_offer_price_rel>
-       <!-- Tabelle tx_irretutorial_mnmmasym_price -->
-       <tx_irretutorial_mnmmasym_price>
-               <uid>1</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>256</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Season from January-December</title>
-               <price>400.00</price>
-               <offers>0</offers>
-       </tx_irretutorial_mnmmasym_price>
-       <tx_irretutorial_mnmmasym_price>
-               <uid>2</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>128</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Season from January-June</title>
-               <price>300.00</price>
-               <offers>0</offers>
-       </tx_irretutorial_mnmmasym_price>
-       <tx_irretutorial_mnmmasym_price>
-               <uid>3</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>64</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Season from June-December</title>
-               <price>500.00</price>
-               <offers>0</offers>
-       </tx_irretutorial_mnmmasym_price>
-</dataset>
index 04862da..79c7e66 100644 (file)
@@ -68,7 +68,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
         */
 
        /**
-        * @test
         * @see DataSet/Assertion/createParentContentRecord.csv
         */
        public function createParentContent() {
@@ -76,7 +75,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyParentContentRecord.csv
         */
        public function modifyParentContent() {
@@ -84,7 +82,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/deleteParentContentRecord.csv
         */
        public function deleteParentContent() {
@@ -92,7 +89,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/copyParentContentRecord.csv
         */
        public function copyParentContent() {
@@ -109,15 +105,50 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
-               $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+       public function localizeParentContentInKeepMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/changeParentContentRecordSorting.csv
         */
        public function changeParentContentSorting() {
@@ -125,7 +156,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/moveParentContentRecordToDifferentPage.csv
         */
        public function moveParentContentToDifferentPage() {
@@ -133,7 +163,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/moveParentContentRecordToDifferentPageAndChangeSorting.csv
         */
        public function moveParentContentToDifferentPageAndChangeSorting() {
@@ -146,7 +175,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
         */
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyPageRecord.csv
         */
        public function modifyPage() {
@@ -154,7 +182,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/deletePageRecord.csv
         */
        public function deletePage() {
@@ -162,7 +189,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/copyPageRecord.csv
         */
        public function copyPage() {
@@ -171,7 +197,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/copyPageWHotelBeforeParentContent.csv
         */
        public function copyPageWithHotelBeforeParentContent() {
@@ -190,7 +215,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
         */
 
        /**
-        * @test
         * @see DataSet/Assertion/createParentContentRecordWithHotelAndOfferChildRecords.csv
         */
        public function createParentContentWithHotelAndOfferChildren() {
@@ -206,7 +230,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/createAndCopyParentContentRecordWithHotelAndOfferChildRecords.csv
         */
        public function createAndCopyParentContentWithHotelAndOfferChildren() {
@@ -226,7 +249,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/createAndLocalizeParentContentRecordWithHotelAndOfferChildRecords.csv
         */
        public function createAndLocalizeParentContentWithHotelAndOfferChildren() {
@@ -244,7 +266,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyOnlyHotelChildRecord.csv
         */
        public function modifyOnlyHotelChild() {
@@ -252,7 +273,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyParentRecordAndChangeHotelChildRecordsSorting.csv
         */
        public function modifyParentAndChangeHotelChildrenSorting() {
@@ -260,7 +280,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyParentRecordWithHotelChildRecord.csv
         */
        public function modifyParentWithHotelChild() {
@@ -274,7 +293,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyParentRecordAndAddHotelChildRecord.csv
         */
        public function modifyParentAndAddHotelChild() {
@@ -288,7 +306,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @test
         * @see DataSet/Assertion/modifyParentRecordAndDeleteHotelChildRecord.csv
         */
        public function modifyParentAndDeleteHotelChild() {
index f55a604..378b8a3 100644 (file)
@@ -112,11 +112,56 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\Fore
 
        /**
         * @test
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
-               parent::localizeParentContent();
-               $this->assertAssertionDataSet('localizeParentContent');
+       public function localizeParentContentInKeepMode() {
+               parent::localizeParentContentInKeepMode();
+               $this->assertAssertionDataSet('localizeParentContentKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               parent::localizeParentContentWithAllChildrenInKeepMode();
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               parent::localizeParentContentInSelectMode();
+               $this->assertAssertionDataSet('localizeParentContentSelect');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               parent::localizeParentContentWithAllChildrenInSelectMode();
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
 
                $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
                $this->assertResponseContentStructureHasRecords(
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContent.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContent.csv
deleted file mode 100644 (file)
index 08d8861..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
-,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
-,4,89,1280,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,"Hotel #1",298,tt_content,,1
-,6,89,1,0,1,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,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
-,6,89,1536,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
-,8,89,1024,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
-,9,89,1,0,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
-,8,89,1792,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
-,10,89,768,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
-,12,89,1024,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
-,14,89,1,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentKeep.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentKeep.csv
new file mode 100644 (file)
index 0000000..bc86e18
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentSelect.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentSelect.csv
new file mode 100644 (file)
index 0000000..bc86e18
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenKeep.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenKeep.csv
new file mode 100644 (file)
index 0000000..bc86e18
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenSelect.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenSelect.csv
new file mode 100644 (file)
index 0000000..08d8861
--- /dev/null
@@ -0,0 +1,28 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,1280,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,"Hotel #1",298,tt_content,,1
+,6,89,1,0,1,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,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,1536,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1024,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,89,1,0,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,1792,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,768,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1024,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
+,14,89,1,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/MToNMMAsymmetricLocalizationKeepTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/MToNMMAsymmetricLocalizationKeepTest.php
deleted file mode 100644 (file)
index 0bab522..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE;
-
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Oliver Hader <oliver@typo3.org>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-require_once(dirname(__FILE__). '/AbstractLocalizationTestCase.php');
-
-/**
- * Test case for m:n MM localizations using localizationMode 'keep'.
- *
- */
-class MtoNMMAsymmetricLocalizationKeepTest extends AbstractLocalizationTestCase {
-
-       /**
-        * Sets up this test case.
-        *
-        * @return void
-        */
-       public function setUp() {
-               parent::setUp();
-
-               // Set the localizazionMode to 'select' for all IRRE fields:
-               foreach ($this->structure as $tableName => $fields) {
-                       foreach ($fields as $fieldName) {
-                               $this->setTcaFieldConfigurationBehaviour(
-                                       $tableName, $fieldName,
-                                       self::BEHAVIOUR_LocalizationMode,
-                                       self::VALUE_LocalizationMode_Keep
-                               );
-                       }
-               }
-
-               $this->importDataSet(dirname(__FILE__) . '/Fixtures/MToNMMAsymmetric.xml');
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function isOnlyParentLocalized() {
-               $this->simulateCommand(
-                       self::COMMAND_Localize,
-                       self::VALUE_LanguageId,
-                       array(self::TABLE_Hotel => '1')
-               );
-
-               $localizedHotelId = $this->getLocalizationId(self::TABLE_Hotel, 1);
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Hotel => '1',
-                       )
-               );
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Offer => '1,2',
-                       ),
-                       self::VALUE_LanguageId,
-                       FALSE
-               );
-
-               $this->assertChildren(
-                       self::TABLE_Hotel, $localizedHotelId, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => '1',
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => '2',
-                               ),
-                       ),
-                       self::TABLE_Relation_Hotel_Offer
-               );
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function areNoChildElementsLocalizedWithParent() {
-               $this->setTcaFieldConfigurationBehaviour(
-                       self::TABLE_Hotel,
-                       self::FIELD_Hotel_Offers,
-                       self::BEHAVIOUR_LocalizeChildrenAtParentLocalization,
-                       TRUE
-               );
-
-               $this->setTcaFieldConfigurationBehaviour(
-                       self::TABLE_Offer,
-                       self::FIELD_Offer_Prices,
-                       self::BEHAVIOUR_LocalizeChildrenAtParentLocalization,
-                       TRUE
-               );
-
-               $this->simulateCommand(
-                       self::COMMAND_Localize,
-                       self::VALUE_LanguageId,
-                       array(self::TABLE_Hotel => '1')
-               );
-
-               $localizedHotelId = $this->getLocalizationId(self::TABLE_Hotel, 1);
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Hotel => '1',
-                       )
-               );
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Offer => '1,2',
-                               self::TABLE_Price => '1,2,3',
-                       ),
-                       self::VALUE_LanguageId,
-                       FALSE
-               );
-
-               $this->assertChildren(
-                       self::TABLE_Hotel, $localizedHotelId, self::FIELD_Hotel_Offers,
-                       array(
-                                array(
-                                        'tableName' => self::TABLE_Offer,
-                                        'uid' => '1',
-                                ),
-                                array(
-                                        'tableName' => self::TABLE_Offer,
-                                        'uid' => '2',
-                                ),
-                       ),
-                       self::TABLE_Relation_Hotel_Offer
-               );
-       }
-}
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/MToNMMAsymmetricLocalizationSelectTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/MToNMMAsymmetricLocalizationSelectTest.php
deleted file mode 100644 (file)
index c22ad75..0000000
+++ /dev/null
@@ -1,322 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE;
-
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Oliver Hader <oliver@typo3.org>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-require_once(dirname(__FILE__). '/AbstractLocalizationTestCase.php');
-
-/**
- * Testcase for m:n MM localizations using localizationMode 'select'.
- *
- */
-class MtoNMMAsymetricLocalizationSelectTest extends AbstractLocalizationTestCase {
-
-       /**
-        * Sets up this test case.
-        *
-        * @return void
-        */
-       public function setUp() {
-               parent::setUp();
-
-               // Set the localizazionMode to 'select' for all IRRE fields:
-               foreach ($this->structure as $tableName => $fields) {
-                       foreach ($fields as $fieldName) {
-                               $this->setTcaFieldConfigurationBehaviour(
-                                       $tableName, $fieldName,
-                                       self::BEHAVIOUR_LocalizationMode,
-                                       self::VALUE_LocalizationMode_Select
-                               );
-                       }
-               }
-
-               $this->importDataSet(dirname(__FILE__) . '/Fixtures/MToNMMAsymmetric.xml');
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function isOnlyParentLocalized() {
-               $this->simulateCommand(
-                       self::COMMAND_Localize,
-                       self::VALUE_LanguageId,
-                       array(self::TABLE_Hotel => '1')
-               );
-
-               $localizedHotelId = $this->getLocalizationId(self::TABLE_Hotel, 1);
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Hotel => '1',
-                       )
-               );
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Offer => '1,2',
-                       ),
-                       self::VALUE_LanguageId,
-                       FALSE
-               );
-
-               $this->assertChildren(
-                       self::TABLE_Hotel, $localizedHotelId, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => '1',
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => '2',
-                               ),
-                       ),
-                       self::TABLE_Relation_Hotel_Offer,
-                       FALSE
-               );
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function areChildElementsLocalized() {
-               $this->simulateCommand(
-                       self::COMMAND_Localize,
-                       self::VALUE_LanguageId,
-                       array(self::TABLE_Hotel => '1')
-               );
-
-               $localizedHotelId = $this->getLocalizationId(self::TABLE_Hotel, 1);
-
-               $this->simulateCommand(
-                       self::COMMAND_LocalizeSynchronize,
-                       self::FIELD_Hotel_Offers . ',' . self::COMMAND_LocalizeSynchronize_Localize,
-                       array(self::TABLE_Hotel => $localizedHotelId)
-               );
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Hotel => '1',
-                               self::TABLE_Offer => '1,2',
-                       )
-               );
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Price => '1,2,3',
-                       ),
-                       self::VALUE_LanguageId,
-                       FALSE
-               );
-
-               $this->assertChildren(
-                       self::TABLE_Hotel, $localizedHotelId, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'sys_language_uid' => self::VALUE_LanguageId,
-                                       'l18n_parent' => '1',
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'sys_language_uid' => self::VALUE_LanguageId,
-                                       'l18n_parent' => '2',
-                               ),
-                       ),
-                       self::TABLE_Relation_Hotel_Offer
-               );
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function areChildElementsLocalizedWithParent() {
-               $this->setTcaFieldConfigurationBehaviour(
-                       self::TABLE_Offer,
-                       self::FIELD_Offer_Prices,
-                       self::BEHAVIOUR_LocalizeChildrenAtParentLocalization,
-                       TRUE
-               );
-
-               $this->simulateCommand(
-                       self::COMMAND_Localize,
-                       self::VALUE_LanguageId,
-                       array(self::TABLE_Hotel => '1')
-               );
-
-               $localizedHotelId = $this->getLocalizationId(self::TABLE_Hotel, 1);
-
-               $this->simulateCommand(
-                       self::COMMAND_LocalizeSynchronize,
-                       self::FIELD_Hotel_Offers . ',' . self::COMMAND_LocalizeSynchronize_Localize,
-                       array(self::TABLE_Hotel => $localizedHotelId)
-               );
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Hotel => '1',
-                               self::TABLE_Offer => '1,2',
-                               self::TABLE_Price => '1,2,3',
-                       )
-               );
-
-               /* Offers */
-               $this->assertChildren(
-                       self::TABLE_Hotel, $localizedHotelId, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'sys_language_uid' => self::VALUE_LanguageId,
-                                       'l18n_parent' => '1',
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'sys_language_uid' => self::VALUE_LanguageId,
-                                       'l18n_parent' => '2',
-                               ),
-                       ),
-                       self::TABLE_Relation_Hotel_Offer
-               );
-
-               /* Prices */
-               $this->assertChildren(
-                       self::TABLE_Offer, $this->getLocalizationId(self::TABLE_Offer, 1), self::FIELD_Offer_Prices,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Price,
-                                       'sys_language_uid' => self::VALUE_LanguageId,
-                                       'l18n_parent' => '1',
-                               ),
-                       ),
-                       self::TABLE_Relation_Offer_Price
-               );
-
-               $this->assertChildren(
-                       self::TABLE_Offer, $this->getLocalizationId(self::TABLE_Offer, 2), self::FIELD_Offer_Prices,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Price,
-                                       'sys_language_uid' => self::VALUE_LanguageId,
-                                       'l18n_parent' => '2',
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Price,
-                                       'sys_language_uid' => self::VALUE_LanguageId,
-                                       'l18n_parent' => '3',
-                               ),
-                       ),
-                       self::TABLE_Relation_Offer_Price
-               );
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function areDirectChildElementsLocalizedWithParent() {
-               $this->setTcaFieldConfigurationBehaviour(
-                       self::TABLE_Hotel,
-                       self::FIELD_Hotel_Offers,
-                       self::BEHAVIOUR_LocalizeChildrenAtParentLocalization,
-                       TRUE
-               );
-
-               $this->simulateCommand(
-                       self::COMMAND_Localize,
-                       self::VALUE_LanguageId,
-                       array(self::TABLE_Hotel => '1')
-               );
-
-               $localizedHotelId = $this->getLocalizationId(self::TABLE_Hotel, 1);
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Hotel => '1',
-                               self::TABLE_Offer => '1,2',
-                       )
-               );
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Price => '1,2,3',
-                       ),
-                       self::VALUE_LanguageId,
-                       FALSE
-               );
-
-               $this->assertChildren(
-                       self::TABLE_Hotel, $localizedHotelId, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'sys_language_uid' => self::VALUE_LanguageId,
-                                       'l18n_parent' => '1',
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'sys_language_uid' => self::VALUE_LanguageId,
-                                       'l18n_parent' => '2',
-                               ),
-                       ),
-                       self::TABLE_Relation_Hotel_Offer
-               );
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function areAllChildElementsLocalizedWithParent() {
-               $this->setTcaFieldConfigurationBehaviour(
-                       self::TABLE_Hotel,
-                       self::FIELD_Hotel_Offers,
-                       self::BEHAVIOUR_LocalizeChildrenAtParentLocalization,
-                       TRUE
-               );
-
-               $this->setTcaFieldConfigurationBehaviour(
-                       self::TABLE_Offer,
-                       self::FIELD_Offer_Prices,
-                       self::BEHAVIOUR_LocalizeChildrenAtParentLocalization,
-                       TRUE
-               );
-
-               $this->simulateCommand(
-                       self::COMMAND_Localize,
-                       self::VALUE_LanguageId,
-                       array(self::TABLE_Hotel => '1')
-               );
-
-               $this->assertLocalizations(
-                       array(
-                               self::TABLE_Hotel => '1',
-                               self::TABLE_Offer => '1,2',
-                               self::TABLE_Price => '1,2,3',
-                       )
-               );
-       }
-}
index 657bb6b..45cc715 100644 (file)
@@ -96,6 +96,14 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
 
        /**
         * @test
+        * @see DataSet/copyPasteContent.csv
+        */
+       public function copyPasteContent() {
+               $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageId, array('header' => 'Testing #1'));
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/localizeContentRecord.csv
         */
        public function localizeContent() {
@@ -120,6 +128,14 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
 
        /**
         * @test
+        * @see DataSet/movePasteContentToDifferentPage.csv
+        */
+       public function movePasteContentToDifferentPage() {
+               $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget, array('header' => 'Testing #1'));
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/moveContentRecordToDifferentPageAndChangeSorting.csv
         */
        public function moveContentToDifferentPageAndChangeSorting() {
index c3ff2c9..520c6cb 100644 (file)
@@ -91,6 +91,18 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\A
 
        /**
         * @test
+        * @see DataSet/Assertion/copyContentRecord.csv
+        */
+       public function copyPasteContent() {
+               parent::copyPasteContent();
+               $this->assertAssertionDataSet('copyPasteContent');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId)->getResponseContent();
+               $this->assertResponseContentHasRecords($responseContent, self::TABLE_Content, 'header', 'Testing #1');
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/localizeContentRecord.csv
         */
        public function localizeContent() {
@@ -129,6 +141,20 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\A
 
        /**
         * @test
+        * @see DataSet/movePasteContentToDifferentPage.csv
+        */
+       public function movePasteContentToDifferentPage() {
+               parent::movePasteContentToDifferentPage();
+               $this->assertAssertionDataSet('movePasteContentToDifferentPage');
+
+               $responseContentSource = $this->getFrontendResponse(self::VALUE_PageId)->getResponseContent();
+               $this->assertResponseContentHasRecords($responseContentSource, self::TABLE_Content, 'header', 'Regular Element #1');
+               $responseContentTarget = $this->getFrontendResponse(self::VALUE_PageIdTarget)->getResponseContent();
+               $this->assertResponseContentHasRecords($responseContentTarget, self::TABLE_Content, 'header', 'Testing #1');
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/moveContentRecordToDifferentPageAndChangeSorting.csv
         */
        public function moveContentToDifferentPageAndChangeSorting() {
index 0b19328..da90cb3 100644 (file)
@@ -1,4 +1,4 @@
 tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories,tx_irretutorial_1nff_hotels
-,297,89,768,0,0,0,0,0,0,0,0,"Regular Element #1",,0,0
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,0
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,297,89,768,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"
index f8ede5d..0fa35ef 100644 (file)
@@ -1,5 +1,5 @@
 tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories,tx_irretutorial_1nff_hotels
-,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,0
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,0
-,299,89,128,0,0,0,0,0,0,0,0,"Regular Element #2 (copy 1)",0,0,0
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,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,128,0,0,0,0,0,0,0,0,"Regular Element #2 (copy 1)"
index 3a8b5f2..17a93ce 100644 (file)
@@ -6,8 +6,8 @@ pages
 ,90,88,512,0,0,0,0,0,0,Target
 ,91,90,256,0,0,0,0,0,0,Relations
 tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,tx_irretutorial_1nff_hotels
-,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0
-,299,91,256,0,0,0,0,0,0,0,0,"Regular Element #2",0,0
-,300,91,128,0,0,0,0,0,0,0,0,"Regular Element #1",0,0
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,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,91,256,0,0,0,0,0,0,0,0,"Regular Element #2"
+,300,91,128,0,0,0,0,0,0,0,0,"Regular Element #1"
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyPasteContent.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/copyPasteContent.csv
new file mode 100644 (file)
index 0000000..b4fb6b3
--- /dev/null
@@ -0,0 +1,5 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,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,128,0,0,0,0,0,0,0,0,"Testing #1"
index 136b3ae..3578c51 100644 (file)
@@ -1,6 +1,6 @@
-"tt_content",,,,,,,,,,,,,,
-,"uid","pid","sorting","deleted","sys_language_uid","l18n_parent","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header","image","categories","tx_irretutorial_1nff_hotels"
-,299,89,128,0,0,0,0,0,0,0,0,"Testing #1","\NULL",0,0
-,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","\NULL",0,0
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2","\NULL",0,0
-,300,89,768,0,0,0,0,0,0,0,0,"Testing #2","\NULL",0,0
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,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,128,0,0,0,0,0,0,0,0,"Testing #1"
+,300,89,768,0,0,0,0,0,0,0,0,"Testing #2"
index b4ed571..cdb8cf6 100644 (file)
@@ -1,4 +1,4 @@
-"tt_content",,,,,,,,,,,,,,,
-,"uid","pid","sorting","deleted","sys_language_uid","l18n_parent","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header","image","categories","tx_irretutorial_1nff_hotels"
-,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","\NULL",0,0
-,298,89,1000000000,1,0,0,0,0,0,0,0,"Regular Element #2","\NULL",0,0
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1"
+,298,89,1000000000,1,0,0,0,0,0,0,0,"Regular Element #2"
index 7a618b4..1d09fe6 100644 (file)
@@ -5,6 +5,6 @@ pages
 ,89,88,1000000000,1,0,0,0,0,0,Relations
 ,90,88,512,0,0,0,0,0,0,Target
 tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories,tx_irretutorial_1nff_hotels
-,297,89,1000000000,1,0,0,0,0,0,0,0,"Regular Element #1",,0,0
-,298,89,1000000000,1,0,0,0,0,0,0,0,"Regular Element #2",,0,0
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,297,89,1000000000,1,0,0,0,0,0,0,0,"Regular Element #1"
+,298,89,1000000000,1,0,0,0,0,0,0,0,"Regular Element #2"
index 34168d1..423e332 100644 (file)
@@ -1,5 +1,5 @@
 tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories,tx_irretutorial_1nff_hotels
-,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,0
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,0
-,299,89,768,0,1,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2",0,0,0
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,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,1,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2"
index 30a21bf..1b7a415 100644 (file)
@@ -8,6 +8,6 @@ pages_language_overlay
 ,uid,pid,deleted,sys_language_uid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,title
 ,1,89,0,1,0,0,0,0,"[Translate to Dansk:] Relations"
 tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories,tx_irretutorial_1nff_hotels
-,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,0
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,0
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,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"
index 7bfc48b..619fc54 100644 (file)
@@ -1,4 +1,4 @@
-"tt_content",,,,,,,,,,,,,,
-,"uid","pid","sorting","deleted","sys_language_uid","l18n_parent","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header","image","categories","tx_irretutorial_1nff_hotels"
-,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","\NULL",0,0
-,298,89,512,0,0,0,0,0,0,0,0,"Testing #1","\NULL",0,0
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,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,"Testing #1"
index 46b8a5f..185e1f1 100644 (file)
@@ -1,4 +1,4 @@
 tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories,tx_irretutorial_1nff_hotels
-,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,0
-,298,90,256,0,0,0,0,0,0,0,0,"Regular Element #2",,0,0
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1"
+,298,90,256,0,0,0,0,0,0,0,0,"Regular Element #2"
index 4a1cb35..ce70447 100644 (file)
@@ -1,4 +1,4 @@
 tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories,tx_irretutorial_1nff_hotels
-,297,90,512,0,0,0,0,0,0,0,0,"Regular Element #1",,0,0
-,298,90,256,0,0,0,0,0,0,0,0,"Regular Element #2",,0,0
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,297,90,512,0,0,0,0,0,0,0,0,"Regular Element #1"
+,298,90,256,0,0,0,0,0,0,0,0,"Regular Element #2"
index 8896718..836ea5e 100644 (file)
@@ -5,6 +5,6 @@ pages
 ,89,90,256,0,0,0,0,0,0,Relations
 ,90,88,512,0,0,0,0,0,0,Target
 tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories,tx_irretutorial_1nff_hotels
-,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,0
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,0
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,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"
index cec2f31..7786fb4 100644 (file)
@@ -5,6 +5,6 @@ pages
 ,89,1,192,0,0,0,0,0,0,Relations
 ,90,1,128,0,0,0,0,0,0,Target
 tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories,tx_irretutorial_1nff_hotels
-,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,0
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,0
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,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"
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/movePasteContentToDifferentPage.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/movePasteContentToDifferentPage.csv
new file mode 100644 (file)
index 0000000..07d1580
--- /dev/null
@@ -0,0 +1,4 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1"
+,298,90,256,0,0,0,0,0,0,0,0,"Testing #1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/AbstractOneToNTestCase.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/AbstractOneToNTestCase.php
deleted file mode 100644 (file)
index d4c57f4..0000000
+++ /dev/null
@@ -1,467 +0,0 @@
-<?php
-namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE;
-
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Oliver Hader <oliver@typo3.org>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-require_once(dirname(__FILE__). '/AbstractTestCase.php');
-
-/**
- * Test case for 1:n csv relations.
- *
- */
-abstract class AbstractOneToNTestCase extends AbstractTestCase {
-       const TABLE_Hotel = 'tx_irretutorial_1ncsv_hotel';
-       const TABLE_Offer = 'tx_irretutorial_1ncsv_offer';
-       const TABLE_Price = 'tx_irretutorial_1ncsv_price';
-
-       const FIELD_Hotel_Offers = 'offers';
-       const FIELD_Offers_Prices = 'prices';
-
-       /**
-        * Versionize all children with parent.
-        *
-        * @return array
-        */
-       protected function versionizeAllChildrenWithParent() {
-               $liveElements = array(
-                       static::TABLE_Hotel => '1',
-                       static::TABLE_Offer => '1,2',
-                       // prices 1,2 are children of offer 2
-                       // price 3 is child of offer 1
-                       static::TABLE_Price => '1,2,3',
-               );
-
-               $this->simulateEditing($liveElements);
-
-               return $liveElements;
-       }
-
-       /****************************************************************
-        * PUBLISH/SWAP/CLEAR Behaviour
-        ****************************************************************/
-
-       /**
-        * @return void
-        * @test
-        */
-       public function isChildPublishedSeparatelyIfParentIsVersionized() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $this->setExpectedLogEntries(1);
-
-               $this->versionizeAllChildrenWithParent();
-
-               $versionizedOfferId = $this->getWorkspaceVersionId(static::TABLE_Offer, 1);
-
-               $this->simulateVersionCommand(
-                       array(
-                               'action' => static::COMMAND_Version_Swap,
-                               'swapWith' => $versionizedOfferId,
-                       ),
-                       array(
-                               static::TABLE_Offer => '1',
-                       )
-               );
-
-               $this->assertContains(
-                       'cannot be swapped or published independently, because it is related to other new or modified records',
-                       $this->getLastLogEntryMessage(),
-                       'Expected error was not reported.'
-               );
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function isChildSwappedSeparatelyIfParentIsVersionized() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $this->setExpectedLogEntries(2);
-
-               $this->versionizeAllChildrenWithParent();
-
-               $versionizedOfferId = $this->getWorkspaceVersionId(static::TABLE_Offer, 1);
-               $versionizedPriceId = $this->getWorkspaceVersionId(static::TABLE_Price, 3);
-
-               $this->simulateCommandByStructure(array(
-                       static::TABLE_Price => array(
-                               '3' => array(
-                                       'version' => array(
-                                               'action' => static::COMMAND_Version_Swap,
-                                               'swapWith' => $versionizedPriceId,
-                                               'swapIntoWS' => 1,
-                                               'notificationAlternativeRecipients' => array(),
-                                       )
-                               )
-                       ),
-                       static::TABLE_Offer => array(
-                               '1' => array(
-                                       'version' => array(
-                                               'action' => static::COMMAND_Version_Swap,
-                                               'swapWith' => $versionizedOfferId,
-                                               'swapIntoWS' => 1,
-                                               'notificationAlternativeRecipients' => array(),
-                                       )
-                               )
-                       ),
-               ));
-
-               $this->assertContains(
-                       'cannot be swapped or published independently, because it is related to other new or modified records',
-                       $this->getLastLogEntryMessage(),
-                       'Expected error was not reported.'
-               );
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function areAllChildrenSwappedAutomaticallyIfParentIsSwapped() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $this->setWorkspacesConsiderReferences(TRUE);
-
-               $this->versionizeAllChildrenWithParent();
-               $versionizedHotelId = $this->getWorkspaceVersionId(static::TABLE_Hotel, 1);
-
-               $this->getCommandMapAccess(1);
-
-               // Swap to live:
-               $this->simulateCommandByStructure(array(
-                       static::TABLE_Hotel => array(
-                               '1' => array(
-                                       'version' => array(
-                                               'action' => static::COMMAND_Version_Swap,
-                                               'swapWith' => $versionizedHotelId,
-                                               'swapIntoWS' => 1,
-                                               'notificationAlternativeRecipients' => array(),
-                                       )
-                               )
-                       ),
-               ));
-
-               $commandMap = $this->getCommandMap()->get();
-
-               $this->assertTrue(isset($commandMap[static::TABLE_Hotel][1]['version']), static::TABLE_Hotel . ':1 is not set.');
-               $this->assertTrue(isset($commandMap[static::TABLE_Offer][1]['version']), static::TABLE_Offer . ':1 is not set.');
-               $this->assertTrue(isset($commandMap[static::TABLE_Offer][2]['version']), static::TABLE_Offer . ':2 is not set.');
-               $this->assertTrue(isset($commandMap[static::TABLE_Price][1]['version']), static::TABLE_Price . ':1 is not set.');
-               $this->assertTrue(isset($commandMap[static::TABLE_Price][2]['version']), static::TABLE_Price . ':2 is not set.');
-               $this->assertTrue(isset($commandMap[static::TABLE_Price][3]['version']), static::TABLE_Price . ':3 is not set.');
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function areAllChildrenDoubleSwappedAutomaticallyIfParentIsSwapped() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $this->setWorkspacesConsiderReferences(TRUE);
-
-               $this->versionizeAllChildrenWithParent();
-               $versionizedHotelId = $this->getWorkspaceVersionId(static::TABLE_Hotel, 1);
-
-               // Swap to live:
-               $this->simulateCommandByStructure(array(
-                       static::TABLE_Hotel => array(
-                               '1' => array(
-                                       'version' => array(
-                                               'action' => static::COMMAND_Version_Swap,
-                                               'swapWith' => $versionizedHotelId,
-                                               'swapIntoWS' => 1,
-                                               'notificationAlternativeRecipients' => array(),
-                                       )
-                               )
-                       ),
-               ));
-
-               $this->getCommandMapAccess(1);
-
-               // Swap back to workspace:
-               $this->simulateCommandByStructure(array(
-                       static::TABLE_Hotel => array(
-                               '1' => array(
-                                       'version' => array(
-                                               'action' => static::COMMAND_Version_Swap,
-                                               'swapWith' => $versionizedHotelId,
-                                               'swapIntoWS' => 1,
-                                               'notificationAlternativeRecipients' => array(),
-                                       )
-                               )
-                       ),
-               ));
-
-               $commandMap = $this->getCommandMap()->get();
-
-               $this->assertTrue(isset($commandMap[static::TABLE_Hotel][1]['version']), static::TABLE_Hotel . ':1 is not set.');
-               $this->assertTrue(isset($commandMap[static::TABLE_Offer][1]['version']), static::TABLE_Offer . ':1 is not set.');
-               $this->assertTrue(isset($commandMap[static::TABLE_Offer][2]['version']), static::TABLE_Offer . ':2 is not set.');
-               $this->assertTrue(isset($commandMap[static::TABLE_Price][1]['version']), static::TABLE_Price . ':1 is not set.');
-               $this->assertTrue(isset($commandMap[static::TABLE_Price][2]['version']), static::TABLE_Price . ':2 is not set.');
-               $this->assertTrue(isset($commandMap[static::TABLE_Price][3]['version']), static::TABLE_Price . ':3 is not set.');
-       }
-
-       /*
-        * Removing child records
-        */
-
-       /**
-        * Live version will be versionized, but one child branch is removed.
-        *
-        * @return void
-        * @test
-        */
-       public function areChildRecordsConsideredToBeRemovedOnEditingParent() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $this->simulateByStructure(
-                       $this->getElementStructureForEditing(array(
-                               static::TABLE_Hotel => '1',
-                       )),
-                       $this->getElementStructureForCommands(static::COMMAND_Delete, 1, array(
-                               static::TABLE_Offer => '1',
-                       ))
-               );
-
-               $this->assertHasDeletePlaceholder(array(
-                       static::TABLE_Offer => '1',
-                       static::TABLE_Price => '3',
-               ));
-       }
-
-       /**
-        * Live version will be versionized, but one child branch is removed.
-        *
-        * @return void
-        * @test
-        */
-       public function areChildRecordsConsideredToBeRemovedOnEditingParentAndChildren() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $this->simulateByStructure(
-                       $this->getElementStructureForEditing(array(
-                               static::TABLE_Hotel => '1',
-                               static::TABLE_Offer => '1',
-                       )),
-                       $this->getElementStructureForCommands(static::COMMAND_Delete, 1, array(
-                               static::TABLE_Offer => '1',
-                       ))
-               );
-
-               $this->assertHasDeletePlaceholder(array(
-                       static::TABLE_Offer => '1',
-                       static::TABLE_Price => '3',
-               ));
-       }
-
-       /**
-        * Versionized version will be modified and one child branch is removed.
-        *
-        * @return void
-        * @test
-        */
-       public function areChildRecordsConsideredToBeRevertedOnEditing() {
-               $this->markTestSkipped('Enable this test once http://forge.typo3.org/issues/29278 is merged');
-
-               $this->versionizeAllChildrenWithParent();
-
-               $versionizedOfferId = $this->getWorkspaceVersionId(static::TABLE_Offer, 1);
-               $versionizedPriceId = $this->getWorkspaceVersionId(static::TABLE_Price, 3);
-
-               $this->simulateCommand(static::COMMAND_Delete, 1, array(static::TABLE_Offer => $versionizedOfferId));
-
-               $this->assertIsDeleted(array(
-                       static::TABLE_Offer => $versionizedOfferId,
-                       static::TABLE_Price => $versionizedPriceId,
-               ));
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function areNestedChildRecordsConsideredToBeRemovedOnDirectRemoval() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $this->simulateCommand(static::COMMAND_Delete, 1, array(static::TABLE_Offer => 1));
-
-               $this->assertHasDeletePlaceholder(array(
-                       static::TABLE_Offer => '1',
-                       static::TABLE_Price => '3',
-               ));
-       }
-
-       /**
-        * Test whether elements that are reverted in the workspace module
-        * also trigger the reverting of child records.
-        *
-        * @return void
-        * @test
-        */
-       public function areChildRecordsRevertedOnRevertingTheRelativeRemovedParent() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $this->setWorkspacesConsiderReferences(TRUE);
-
-               $this->simulateByStructure(
-                       $this->getElementStructureForEditing(array(
-                               static::TABLE_Hotel => '1',
-                               static::TABLE_Offer => '1',
-                       )),
-                       $this->getElementStructureForCommands(static::COMMAND_Delete, 1, array(
-                               static::TABLE_Offer => '1',
-                       ))
-               );
-
-               $versionizedOfferId = $this->getWorkspaceVersionId(static::TABLE_Offer, 1, static::VALUE_WorkspaceId, TRUE);
-
-               $this->simulateCommandByStructure(array(
-                       static::TABLE_Offer => array(
-                               $versionizedOfferId => array(
-                                       'version' => array(
-                                               'action' => static::COMMAND_Version_Clear,
-                                       )
-                               )
-                       ),
-               ));
-
-               $this->assertWorkspaceVersions(array(
-                       static::TABLE_Hotel => '1',
-                       static::TABLE_Offer => '2',
-                       static::TABLE_Price => '1,2',
-               ));
-
-               $this->assertFalse($this->getWorkspaceVersionId(static::TABLE_Offer, 1, static::VALUE_WorkspaceId, TRUE));
-               $this->assertFalse($this->getWorkspaceVersionId(static::TABLE_Price, 3, static::VALUE_WorkspaceId, TRUE));
-       }
-
-       /**
-        * Test whether elements that are reverted in the workspace module
-        * also trigger the reverting of child records.
-        *
-        * @return void
-        * @test
-        */
-       public function areChildRecordsRevertedOnRevertingMultipleElements() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $this->setWorkspacesConsiderReferences(TRUE);
-
-               $this->simulateByStructure(
-                       $this->getElementStructureForEditing(array(
-                               static::TABLE_Hotel => '1',
-                               static::TABLE_Offer => '1',
-                       )),
-                       $this->getElementStructureForCommands(static::COMMAND_Delete, 1, array(
-                               static::TABLE_Offer => '1',
-                       ))
-               );
-
-               $versionizedOfferId = $this->getWorkspaceVersionId(static::TABLE_Offer, 1, static::VALUE_WorkspaceId, TRUE);
-               $versionizedPriceId = $this->getWorkspaceVersionId(static::TABLE_Price, 1);
-
-               $this->simulateCommandByStructure(array(
-                       static::TABLE_Offer => array(
-                               $versionizedOfferId => array(
-                                       'version' => array(
-                                               'action' => static::COMMAND_Version_Clear,
-                                       )
-                               )
-                       ),
-                       static::TABLE_Price => array(
-                               $versionizedPriceId => array(
-                                       'version' => array(
-                                               'action' => static::COMMAND_Version_Clear,
-                                       )
-                               )
-                       ),
-               ));
-
-               $this->assertWorkspaceVersions(array(
-                       static::TABLE_Hotel => '1',
-                       static::TABLE_Offer => '2',
-                       static::TABLE_Price => '2',
-               ));
-
-               $this->assertFalse($this->getWorkspaceVersionId(static::TABLE_Offer, 1, static::VALUE_WorkspaceId, TRUE));
-               $this->assertFalse($this->getWorkspaceVersionId(static::TABLE_Price, 3, static::VALUE_WorkspaceId, TRUE));
-               $this->assertFalse($this->getWorkspaceVersionId(static::TABLE_Price, 1, static::VALUE_WorkspaceId, TRUE));
-       }
-
-       /**
-        * Tests whether records marked to be deleted in a workspace
-        * are really removed if they are published.
-        *
-        * @return void
-        * @test
-        */
-       public function areParentAndChildRecordsRemovedOnPublishingDeleteAction() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $this->setWorkspacesConsiderReferences(TRUE);
-
-               $this->simulateByStructure(
-                       array(),
-                       $this->getElementStructureForCommands(static::COMMAND_Delete, 1, array(
-                               static::TABLE_Hotel => '1',
-                       ))
-               );
-
-               $versionizedHotelId = $this->getWorkspaceVersionId(static::TABLE_Hotel, 1, static::VALUE_WorkspaceId, TRUE);
-
-               // Swap to live:
-               $this->simulateCommandByStructure(array(
-                       static::TABLE_Hotel => array(
-                               '1' => array(
-                                       'version' => array(
-                                               'action' => static::COMMAND_Version_Swap,
-                                               'swapWith' => $versionizedHotelId,
-                                               'notificationAlternativeRecipients' => array(),
-                                       )
-                               )
-                       ),
-               ));
-
-               $this->assertRecords(
-                       array(
-                               static::TABLE_Hotel => array(
-                                       1 => array('deleted' => '1',),
-                               ),
-                               static::TABLE_Offer => array(
-                                       1 => array('deleted' => '1',),
-                                       2 => array('deleted' => '1',),
-                               ),
-                               static::TABLE_Price => array(
-                                       1 => array('deleted' => '1',),
-                                       2 => array('deleted' => '1',),
-                                       3 => array('deleted' => '1',),
-                               ),
-                       ),
-                       static::VALUE_WorkspaceIdIgnore
-               );
-       }
-}
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/AbstractTestCase.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/AbstractTestCase.php
deleted file mode 100644 (file)
index 578576f..0000000
+++ /dev/null
@@ -1,382 +0,0 @@
-<?php
-namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE;
-
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Oliver Hader <oliver@typo3.org>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-require_once(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/DataHandling/IRRE/AbstractTestCase.php');
-
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\DataHandling\DataHandler;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Generic test helpers.
- *
- * @author Oliver Hader <oliver@typo3.org>
- */
-abstract class AbstractTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\AbstractTestCase {
-       const VALUE_TimeStamp = 1250000000;
-       const VALUE_Pid = 1;
-       const VALUE_PidAlternative = 7;
-       const VALUE_WorkspaceId = 90;
-       const VALUE_WorkspaceIdIgnore = -1;
-
-       const COMMAND_Version = 'version';
-       const COMMAND_Version_New = 'new';
-       const COMMAND_Version_Swap = 'swap';
-       const COMMAND_Version_Flush = 'flush';
-       const COMMAND_Version_Clear = 'clearWSID';
-
-       protected $coreExtensionsToLoad = array(
-               'fluid',
-               'version',
-               'workspaces'
-       );
-
-       /**
-        * @var integer
-        */
-       private $modifiedTimeStamp;
-
-       /**
-        * @var \TYPO3\CMS\Version\Hook\DataHandlerHook|\PHPUnit_Framework_MockObject_MockObject
-        */
-       protected $versionTceMainHookMock;
-
-       /**
-        * @var \TYPO3\CMS\Version\DataHandler\CommandMap
-        */
-       protected $versionTceMainCommandMap;
-
-       /**
-        * Sets up this test case.
-        *
-        * @return void
-        */
-       public function setUp() {
-               parent::setUp();
-
-               $this->importDataSet(__DIR__ . '/../../Fixtures/sys_workspace.xml');
-
-               $this->getBackendUser()->workspace = self::VALUE_WorkspaceId;
-               $this->setWorkspacesConsiderReferences(FALSE);
-               $this->setWorkspaceChangeStageMode('');
-               $this->setWorkspaceSwapMode('');
-       }
-
-
-       /**
-        * Gets a modified timestamp to ensure that a record is changed.
-        *
-        * @return integer
-        */
-       protected function getModifiedTimeStamp() {
-               if (!isset($this->modifiedTimeStamp)) {
-                       $this->modifiedTimeStamp = self::VALUE_TimeStamp + 100;
-               }
-
-               return $this->modifiedTimeStamp;
-       }
-
-       /**
-        * Gets an element structure of tables and ids used to simulate editing with TCEmain.
-        *
-        * @param array $tables Table names with list of ids to be edited
-        * @return array
-        */
-       protected function getElementStructureForEditing(array $tables) {
-               $editStructure = array();
-
-               foreach ($tables as $tableName => $idList) {
-                       $ids = GeneralUtility::trimExplode(',', $idList, TRUE);
-                       foreach ($ids as $id) {
-                               $editStructure[$tableName][$id] = array(
-                                       'tstamp' => $this->getModifiedTimeStamp(),
-                               );
-                       }
-               }
-
-               return $editStructure;
-       }
-
-       /**
-        * @param  array $tables Table names with list of ids to be edited
-        * @return DataHandler
-        */
-       protected function simulateEditing(array $tables) {
-               return $this->simulateEditingByStructure($this->getElementStructureForEditing($tables));
-       }
-
-       /**
-        * Simulates editing by using DataHandler.
-        *
-        * @param  array $elements The datamap to be delivered to DataHandler
-        * @return DataHandler
-        */
-       protected function simulateEditingByStructure(array $elements) {
-               $tceMain = $this->getTceMain();
-               $tceMain->start($elements, array());
-               $tceMain->process_datamap();
-
-               return $tceMain;
-       }
-
-       /**
-        * @param array $commands
-        * @param array $tables
-        * @return DataHandler
-        */
-       protected function simulateVersionCommand(array $commands, array $tables) {
-               return $this->simulateCommand(
-                       self::COMMAND_Version,
-                       $commands,
-                       $tables
-               );
-       }
-
-       /**
-        * Simulates editing and command by structure.
-        *
-        * @param array $editingElements
-        * @param array $commandElements
-        * @return DataHandler
-        */
-       protected function simulateByStructure(array $editingElements, array $commandElements) {
-               $tceMain = $this->getTceMain();
-               $tceMain->start($editingElements, $commandElements);
-               $tceMain->process_datamap();
-               $tceMain->process_cmdmap();
-
-               return $tceMain;
-       }
-
-       /**
-        * Asserts that accordant workspace version exist for live versions.
-        *
-        * @param array $tables Table names with list of ids to be edited
-        * @param integer $workspaceId Workspace to be used
-        * @param boolean $expected The expected value
-        * @return void
-        */
-       protected function assertWorkspaceVersions(array $tables, $workspaceId = self::VALUE_WorkspaceId, $expected = TRUE) {
-               foreach ($tables as $tableName => $idList) {
-                       $ids = GeneralUtility::trimExplode(',', $idList, TRUE);
-                       foreach ($ids as $id) {
-                               $workspaceVersion = BackendUtility::getWorkspaceVersionOfRecord($workspaceId, $tableName, $id);
-                               $this->assertTrue(
-                                       ($expected ? $workspaceVersion !== FALSE : $workspaceVersion === FALSE),
-                                       'Workspace version for ' . $tableName . ':' . $id . ($expected ? ' not' : '') . ' available'
-                               );
-                       }
-               }
-       }
-
-       /**
-        * Gets a \TYPO3\CMS\Version\Hook\DataHandlerHook mock.
-        *
-        * @param integer $expectsGetCommandMap (optional) Expects number of invocations to getCommandMap method
-        * @return \TYPO3\CMS\Version\Hook\DataHandlerHook
-        */
-       protected function getVersionTceMainHookMock($expectsGetCommandMap = NULL) {
-               $this->versionTceMainHookMock = $this->getMock('TYPO3\\CMS\\Version\\Hook\\DataHandlerHook', array('getCommandMap'));
-
-               if (is_integer($expectsGetCommandMap) && $expectsGetCommandMap >= 0) {
-                       $this->versionTceMainHookMock->expects($this->exactly($expectsGetCommandMap))->method('getCommandMap')
-                               ->will($this->returnCallback(array($this, 'getVersionTceMainCommandMapCallback')));
-               } elseif (!is_null($expectsGetCommandMap)) {
-                       $this->fail('Expected invocation of getCommandMap must be integer >= 0.');
-               }
-
-               return $this->versionTceMainHookMock;
-       }
-
-       /**
-        * Gets access to the command map.
-        *
-        * @param integer $expectsGetCommandMap Expects number of invocations to getCommandMap method
-        * @return void
-        */
-       protected function getCommandMapAccess($expectsGetCommandMap) {
-               $hookReferenceString = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['version'];
-               $GLOBALS['T3_VAR']['getUserObj'][$hookReferenceString] = $this->getVersionTceMainHookMock($expectsGetCommandMap);
-       }
-
-       /**
-        * @param string $tableName
-        * @param integer $id
-        * @param integer $workspaceId
-        * @param boolean $directLookup
-        * @return boolean
-        */
-       protected function getWorkspaceVersionId($tableName, $id, $workspaceId = self::VALUE_WorkspaceId, $directLookup = FALSE) {
-               if ($directLookup) {
-                       $records = $this->getAllRecords($tableName);
-                       foreach ($records as $record) {
-                               if (($workspaceId === self::VALUE_WorkspaceIdIgnore || $record['t3ver_wsid'] == $workspaceId) && $record['t3ver_oid'] == $id) {
-                                       return $record['uid'];
-                               }
-                       }
-               } else {
-                       $workspaceVersion = BackendUtility::getWorkspaceVersionOfRecord($workspaceId, $tableName, $id);
-                       if ($workspaceVersion !== FALSE) {
-                               return $workspaceVersion['uid'];
-                       }
-               }
-
-               return FALSE;
-       }
-
-       /**
-        * Asserts the existence of a delete placeholder record.
-        *
-        * @param array $tables
-        * @return void
-        */
-       protected function assertHasDeletePlaceholder(array $tables) {
-               foreach ($tables as $tableName => $idList) {
-                       $records = $this->getAllRecords($tableName);
-
-                       $ids = GeneralUtility::trimExplode(',', $idList, TRUE);
-                       foreach ($ids as $id) {
-                               $failureMessage = 'Delete placeholder of "' . $tableName . ':' . $id . '"';
-                               $versionizedId = $this->getWorkspaceVersionId($tableName, $id);
-                               $this->assertTrue(isset($records[$versionizedId]), $failureMessage . ' does not exist');
-                               $this->assertEquals($id, $records[$versionizedId]['t3_origuid'], $failureMessage . ' has wrong relation to live workspace');
-                               $this->assertEquals($id, $records[$versionizedId]['t3ver_oid'], $failureMessage . ' has wrong relation to live workspace');
-                               $this->assertEquals(2, $records[$versionizedId]['t3ver_state'], $failureMessage . ' is not marked as DELETED');
-                               $this->assertEquals('DELETED!', $records[$versionizedId]['t3ver_label'], $failureMessage . ' is not marked as DELETED');
-                       }
-               }
-       }
-
-       /**
-        * @param array $tables
-        * @return void
-        */
-       protected function assertIsDeleted(array $tables) {
-               foreach ($tables as $tableName => $idList) {
-                       $records = $this->getAllRecords($tableName);
-
-                       $ids = GeneralUtility::trimExplode(',', $idList, TRUE);
-                       foreach ($ids as $id) {
-                               $failureMessage = 'Workspace version "' . $tableName . ':' . $id . '"';
-                               $this->assertTrue(isset($records[$id]), $failureMessage . ' does not exist');
-                               $this->assertEquals(0, $records[$id]['t3ver_state']);
-                               $this->assertEquals(1, $records[$id]['deleted']);
-                       }
-               }
-       }
-
-       /**
-        * @param array $tables
-        * @return void
-        */
-       protected function assertIsCleared(array $tables) {
-               foreach ($tables as $tableName => $idList) {
-                       $records = $this->getAllRecords($tableName);
-
-                       $ids = GeneralUtility::trimExplode(',', $idList, TRUE);
-                       foreach ($ids as $id) {
-                               $failureMessage = 'Workspace version "' . $tableName . ':' . $id . '"';
-                               $this->assertTrue(isset($records[$id]), $failureMessage . ' does not exist');
-                               $this->assertEquals(0, $records[$id]['t3ver_state'], $failureMessage . ' has wrong state value');
-                               $this->assertEquals(0, $records[$id]['t3ver_wsid'], $failureMessage . ' is still in offline workspace');
-                               $this->assertEquals(-1, $records[$id]['pid'], $failureMessage . ' has wrong pid value');
-                       }
-               }
-       }
-
-       /**
-        * @param array $assertions
-        * @param integer $workspaceId
-        */
-       protected function assertRecords(array $assertions, $workspaceId = NULL) {
-               foreach ($assertions as $table => $elements) {
-                       $records = $this->getAllRecords($table);
-
-                       foreach ($elements as $uid => $data) {
-                               $intersection = array_intersect_assoc($data, $records[$uid]);
-                               $differences = array_intersect_key($records[$uid], array_diff_assoc($data, $records[$uid]));
-
-                               $this->assertTrue(
-                                       count($data) === count($intersection),
-                                       'Expected ' . $this->elementToString($data) . ' got differences in ' . $this->elementToString($differences) . ' for table ' . $table
-                               );
-
-                               if (is_integer($workspaceId)) {
-                                       $workspaceVersionId = $this->getWorkspaceVersionId($table, $uid, $workspaceId, TRUE);
-                                       $intersection = array_intersect_assoc($data, $records[$workspaceVersionId]);
-                                       $differences = array_intersect_key($records[$workspaceVersionId], array_diff_assoc($data, $records[$workspaceVersionId]));
-
-                                       $this->assertTrue(
-                                               count($data) === count($intersection),
-                                               'Expected ' . $this->elementToString($data) . ' got differences in ' . $this->elementToString($differences) . ' for table ' . $table
-                                       );
-                               }
-                       }
-               }
-       }
-
-       /**
-        * Sets the User TSconfig property options.workspaces.considerReferences.
-        *
-        * @param boolean $workspacesConsiderReferences
-        * @return void
-        */
-       protected function setWorkspacesConsiderReferences($workspacesConsiderReferences = TRUE) {
-               $this->getBackendUser()->userTS['options.']['workspaces.']['considerReferences'] = ($workspacesConsiderReferences ? 1 : 0);
-       }
-
-       /**
-        * Sets the User TSconfig property options.workspaces.swapMode.
-        *
-        * @param string $workspaceSwapMode
-        * @return void
-        */
-       protected function setWorkspaceSwapMode($workspaceSwapMode = 'any') {
-               $this->getBackendUser()->userTS['options.']['workspaces.']['swapMode'] = $workspaceSwapMode;
-       }
-
-       /**
-        * Sets the User TSconfig property options.workspaces.changeStageMode.
-        *
-        * @param string $workspaceChangeStateMode
-        * @return void
-        */
-       protected function setWorkspaceChangeStageMode($workspaceChangeStateMode = 'any') {
-               $this->getBackendUser()->userTS['options.']['workspaces.']['changeStageMode'] = $workspaceChangeStateMode;
-       }
-
-       public function getVersionTceMainCommandMapCallback(DataHandler $tceMain, array $commandMap) {
-               $this->versionTceMainCommandMap = GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\DataHandler\\CommandMap', $this->versionTceMainHookMock, $tceMain, $commandMap, self::VALUE_WorkspaceId);
-               return $this->versionTceMainCommandMap;
-       }
-
-       /**
-        * @return \TYPO3\CMS\Version\DataHandler\CommandMap
-        */
-       protected function getCommandMap() {
-               return $this->versionTceMainCommandMap;
-       }
-}
index 405888f..1cef2f2 100644 (file)
@@ -126,9 +126,45 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
+       public function localizeParentContentInKeepMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
                $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
        }
index 7a1448f..8c9b103 100644 (file)
@@ -124,11 +124,56 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/Assertion/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
-               parent::localizeParentContent();
-               $this->assertAssertionDataSet('localizeParentContent');
+       public function localizeParentContentInKeepMode() {
+               parent::localizeParentContentInKeepMode();
+               $this->assertAssertionDataSet('localizeParentContentKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/Assertion/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               parent::localizeParentContentWithAllChildrenInKeepMode();
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/Assertion/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               parent::localizeParentContentInSelectMode();
+               $this->assertAssertionDataSet('localizeParentContentSelect');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/Assertion/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               parent::localizeParentContentWithAllChildrenInSelectMode();
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
 
                $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
                $this->assertResponseContentStructureHasRecords(
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContent.csv
deleted file mode 100644 (file)
index 3092b16..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
-,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",6
-,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",6
-tx_irretutorial_1ncsv_hotel
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
-,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
-,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
-,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
-,6,89,96,0,1,5,1,1,0,0,0,"[Translate to Dansk:] Hotel #1",9
-,7,-1,96,0,1,5,1,-1,0,6,0,"[Translate to Dansk:] Hotel #1",9
-tx_irretutorial_1ncsv_offer
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
-,5,89,256,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,"Offer #1.2","10,11"
-,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
-,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
-,9,89,48,0,1,8,1,1,0,0,0,"[Translate to Dansk:] Offer #1.1",14
-,10,-1,48,0,1,8,1,-1,0,9,0,"[Translate to Dansk:] Offer #1.1",14
-tx_irretutorial_1ncsv_price
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
-,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
-,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
-,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
-,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
-,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
-,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
-,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
-,14,89,6,0,1,13,1,1,0,0,0,"[Translate to Dansk:] Price #1.1.1"
-,15,-1,6,0,1,13,1,-1,0,14,0,"[Translate to Dansk:] Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentKeep.csv
new file mode 100644 (file)
index 0000000..47be8bf
--- /dev/null
@@ -0,0 +1,26 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",
+,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",
+tx_irretutorial_1ncsv_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentSelect.csv
new file mode 100644 (file)
index 0000000..47be8bf
--- /dev/null
@@ -0,0 +1,26 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",
+,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",
+tx_irretutorial_1ncsv_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildrenKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildrenKeep.csv
new file mode 100644 (file)
index 0000000..47be8bf
--- /dev/null
@@ -0,0 +1,26 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",
+,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",
+tx_irretutorial_1ncsv_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildrenSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildrenSelect.csv
new file mode 100644 (file)
index 0000000..3092b16
--- /dev/null
@@ -0,0 +1,32 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",6
+,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",6
+tx_irretutorial_1ncsv_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+,6,89,96,0,1,5,1,1,0,0,0,"[Translate to Dansk:] Hotel #1",9
+,7,-1,96,0,1,5,1,-1,0,6,0,"[Translate to Dansk:] Hotel #1",9
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
+,9,89,48,0,1,8,1,1,0,0,0,"[Translate to Dansk:] Offer #1.1",14
+,10,-1,48,0,1,8,1,-1,0,9,0,"[Translate to Dansk:] Offer #1.1",14
+tx_irretutorial_1ncsv_price
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,14,89,6,0,1,13,1,1,0,0,0,"[Translate to Dansk:] Price #1.1.1"
+,15,-1,6,0,1,13,1,-1,0,14,0,"[Translate to Dansk:] Price #1.1.1"
index ddcc577..a0a38fb 100644 (file)
@@ -135,12 +135,60 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
-               parent::localizeParentContent();
+       public function localizeParentContentInKeepMode() {
+               parent::localizeParentContentInKeepMode();
                $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
-               $this->assertAssertionDataSet('localizeParentContent');
+               $this->assertAssertionDataSet('localizeParentContentKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               parent::localizeParentContentWithAllChildrenInKeepMode();
+               $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               parent::localizeParentContentInSelectMode();
+               $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
+               $this->assertAssertionDataSet('localizeParentContentSelect');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               parent::localizeParentContentWithAllChildrenInSelectMode();
+               $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
 
                $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
                $this->assertResponseContentStructureHasRecords(
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContent.csv
deleted file mode 100644 (file)
index 888a11b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
-,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
-,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
-,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
-,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
-,6,89,96,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
-,5,89,256,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,"Offer #1.2","10,11"
-,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
-,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
-,9,89,48,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
-,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
-,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
-,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
-,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
-,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
-,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
-,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
-,14,89,6,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentKeep.csv
new file mode 100644 (file)
index 0000000..b52503d
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentSelect.csv
new file mode 100644 (file)
index 0000000..b52503d
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentWAllChildrenKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentWAllChildrenKeep.csv
new file mode 100644 (file)
index 0000000..b52503d
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentWAllChildrenSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentWAllChildrenSelect.csv
new file mode 100644 (file)
index 0000000..888a11b
--- /dev/null
@@ -0,0 +1,28 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+,6,89,96,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
+,9,89,48,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,14,89,6,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1"
index 38119c4..5eb74fb 100644 (file)
@@ -134,12 +134,60 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
-               parent::localizeParentContent();
+       public function localizeParentContentInKeepMode() {
+               parent::localizeParentContentInKeepMode();
                $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
-               $this->assertAssertionDataSet('localizeParentContent');
+               $this->assertAssertionDataSet('localizeParentContentKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               parent::localizeParentContentWithAllChildrenInKeepMode();
+               $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               parent::localizeParentContentInSelectMode();
+               $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+               $this->assertAssertionDataSet('localizeParentContentSelect');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               parent::localizeParentContentWithAllChildrenInSelectMode();
+               $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
 
                $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
                $this->assertResponseContentStructureHasRecords(
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContent.csv
deleted file mode 100644 (file)
index 888a11b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
-,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
-,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
-,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
-,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
-,6,89,96,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
-,5,89,256,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,"Offer #1.2","10,11"
-,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
-,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
-,9,89,48,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
-,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
-,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
-,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
-,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
-,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
-,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
-,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
-,14,89,6,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentKeep.csv
new file mode 100644 (file)
index 0000000..b52503d
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentSelect.csv
new file mode 100644 (file)
index 0000000..b52503d
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentWAllChildrenKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentWAllChildrenKeep.csv
new file mode 100644 (file)
index 0000000..b52503d
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentWAllChildrenSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentWAllChildrenSelect.csv
new file mode 100644 (file)
index 0000000..888a11b
--- /dev/null
@@ -0,0 +1,28 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,89,768,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+,6,89,96,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,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,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
+,9,89,48,0,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,14,89,6,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1"
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/Fixtures/OneToNCSV.xml b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/Fixtures/OneToNCSV.xml
deleted file mode 100644 (file)
index 575c3ed..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<dataset>
-       <!-- Tabelle tx_irretutorial_1ncsv_hotel -->
-       <tx_irretutorial_1ncsv_hotel>
-               <uid>1</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>256</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Wellness Well-Being Hotel Rosengarten</title>
-               <offers>1,2</offers>
-       </tx_irretutorial_1ncsv_hotel>
-       <!-- Tabelle tx_irretutorial_1ncsv_offer -->
-       <tx_irretutorial_1ncsv_offer>
-               <uid>1</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>256</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>&quot;Experience it&quot; Week</title>
-               <prices>3</prices>
-       </tx_irretutorial_1ncsv_offer>
-       <tx_irretutorial_1ncsv_offer>
-               <uid>2</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>128</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Wellness &amp; Beauty Week</title>
-               <prices>1,2</prices>
-       </tx_irretutorial_1ncsv_offer>
-       <!-- Tabelle tx_irretutorial_1ncsv_price -->
-       <tx_irretutorial_1ncsv_price>
-               <uid>1</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>256</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Season from January-June (price per day)</title>
-               <price>200.00</price>
-       </tx_irretutorial_1ncsv_price>
-       <tx_irretutorial_1ncsv_price>
-               <uid>2</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>128</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Season from July-December (price per day)</title>
-               <price>300.00</price>
-       </tx_irretutorial_1ncsv_price>
-       <tx_irretutorial_1ncsv_price>
-               <uid>3</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>64</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Season from January-December (price per day)</title>
-               <price>350.00</price>
-       </tx_irretutorial_1ncsv_price>
-</dataset>
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/Fixtures/OneToNForeignField.xml b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/Fixtures/OneToNForeignField.xml
deleted file mode 100644 (file)
index d62e95e..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<dataset>
-       <!-- Tabelle tx_irretutorial_1nff_hotel -->
-       <tx_irretutorial_1nff_hotel>
-               <uid>1</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>256</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Wellness Well-Being Hotel Rosengarten</title>
-               <offers>2</offers>
-       </tx_irretutorial_1nff_hotel>
-       <tx_irretutorial_1nff_hotel>
-               <uid>2</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>256</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <title>Wellness Well-Being Hotel Rosengarten</title>
-               <offers>0</offers>
-               <parentid>1</parentid>
-               <parenttable>pages</parenttable>
-       </tx_irretutorial_1nff_hotel>
-       <!-- Tabelle tx_irretutorial_1nff_offer -->
-       <tx_irretutorial_1nff_offer>
-               <uid>1</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>1</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <parentid>1</parentid>
-               <parenttable>tx_irretutorial_1nff_hotel</parenttable>
-               <title>Wellness &amp; Beauty Week</title>
-               <prices>1</prices>
-       </tx_irretutorial_1nff_offer>
-       <tx_irretutorial_1nff_offer>
-               <uid>2</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>2</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <parentid>1</parentid>
-               <parenttable>tx_irretutorial_1nff_hotel</parenttable>
-               <title>&quot;Experience it&quot; Week</title>
-               <prices>2</prices>
-       </tx_irretutorial_1nff_offer>
-       <!-- Tabelle tx_irretutorial_1nff_price -->
-       <tx_irretutorial_1nff_price>
-               <uid>1</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>1</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <parentid>2</parentid>
-               <parenttable>tx_irretutorial_1nff_offer</parenttable>
-               <title>Season from July-December (price per day)</title>
-               <price>300.00</price>
-       </tx_irretutorial_1nff_price>
-       <tx_irretutorial_1nff_price>
-               <uid>2</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>2</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <parentid>2</parentid>
-               <parenttable>tx_irretutorial_1nff_offer</parenttable>
-               <title>Season from January-June (price per day)</title>
-               <price>200.00</price>
-       </tx_irretutorial_1nff_price>
-       <tx_irretutorial_1nff_price>
-               <uid>3</uid>
-               <pid>1</pid>
-               <tstamp>1250000000</tstamp>
-               <sys_language_uid>0</sys_language_uid>
-               <l18n_parent>0</l18n_parent>
-               <sorting>1</sorting>
-               <deleted>0</deleted>
-               <hidden>0</hidden>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_id>0</t3ver_id>
-               <t3ver_wsid>0</t3ver_wsid>
-               <t3ver_label></t3ver_label>
-               <t3ver_state>0</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_count>0</t3ver_count>
-               <t3ver_tstamp>0</t3ver_tstamp>
-               <t3ver_move_id>0</t3ver_move_id>
-               <t3_origuid>0</t3_origuid>
-               <parentid>1</parentid>
-               <parenttable>tx_irretutorial_1nff_offer</parenttable>
-               <title>Season from January-December (price per day)</title>
-               <price>350.00</price>
-       </tx_irretutorial_1nff_price>
-</dataset>
\ No newline at end of file
index 74ac9ee..50636d0 100644 (file)
@@ -126,9 +126,45 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
+       public function localizeParentContentInKeepMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
+        * @see DataSet/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               $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->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
                $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
        }
index 1a09644..ad79dfa 100644 (file)
@@ -124,11 +124,56 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/Assertion/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
-               parent::localizeParentContent();
-               $this->assertAssertionDataSet('localizeParentContent');
+       public function localizeParentContentInKeepMode() {
+               parent::localizeParentContentInKeepMode();
+               $this->assertAssertionDataSet('localizeParentContentKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/Assertion/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               parent::localizeParentContentWithAllChildrenInKeepMode();
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/Assertion/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               parent::localizeParentContentInSelectMode();
+               $this->assertAssertionDataSet('localizeParentContentSelect');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/Assertion/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               parent::localizeParentContentWithAllChildrenInSelectMode();
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
 
                $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
                $this->assertResponseContentStructureHasRecords(
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContent.csv
deleted file mode 100644 (file)
index a5c24b9..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
-,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",0
-,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",1
-tx_irretutorial_1nff_hotel
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Hotel #1",297,tt_content,,2
-,4,89,1280,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,"Hotel #1",298,tt_content,,1
-,6,89,1,0,1,5,1,1,0,0,0,"[Translate to Dansk:] Hotel #1",299,tt_content,,0
-,7,-1,1024,0,1,5,1,-1,0,6,0,"[Translate to Dansk:] Hotel #1",299,tt_content,,1
-tx_irretutorial_1nff_offer
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
-,6,89,1536,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
-,8,89,1024,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
-,9,89,1,0,1,8,1,1,0,0,0,"[Translate to Dansk:] Offer #1.1",6,tx_irretutorial_1nff_hotel,,0
-,10,-1,1280,0,1,8,1,-1,0,9,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
-,8,89,1792,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
-,10,89,768,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
-,12,89,1024,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
-,14,89,1,0,1,13,1,1,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer,
-,15,-1,1536,0,1,13,1,-1,0,14,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentKeep.csv
new file mode 100644 (file)
index 0000000..6ebe6dd
--- /dev/null
@@ -0,0 +1,26 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",0
+,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",0
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentSelect.csv
new file mode 100644 (file)
index 0000000..6ebe6dd
--- /dev/null
@@ -0,0 +1,26 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",0
+,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",0
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenKeep.csv
new file mode 100644 (file)
index 0000000..6ebe6dd
--- /dev/null
@@ -0,0 +1,26 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",0
+,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",0
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildrenSelect.csv
new file mode 100644 (file)
index 0000000..a5c24b9
--- /dev/null
@@ -0,0 +1,32 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",0
+,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Hotel #1",297,tt_content,,2
+,4,89,1280,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,"Hotel #1",298,tt_content,,1
+,6,89,1,0,1,5,1,1,0,0,0,"[Translate to Dansk:] Hotel #1",299,tt_content,,0
+,7,-1,1024,0,1,5,1,-1,0,6,0,"[Translate to Dansk:] Hotel #1",299,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,1536,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1024,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,89,1,0,1,8,1,1,0,0,0,"[Translate to Dansk:] Offer #1.1",6,tx_irretutorial_1nff_hotel,,0
+,10,-1,1280,0,1,8,1,-1,0,9,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,1792,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,768,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1024,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
+,14,89,1,0,1,13,1,1,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer,
+,15,-1,1536,0,1,13,1,-1,0,14,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer,
index 763ebe6..985fb07 100644 (file)
@@ -131,12 +131,60 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
-               parent::localizeParentContent();
+       public function localizeParentContentInKeepMode() {
+               parent::localizeParentContentInKeepMode();
                $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
-               $this->assertAssertionDataSet('localizeParentContent');
+               $this->assertAssertionDataSet('localizeParentContentKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               parent::localizeParentContentWithAllChildrenInKeepMode();
+               $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               parent::localizeParentContentInSelectMode();
+               $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
+               $this->assertAssertionDataSet('localizeParentContentSelect');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               parent::localizeParentContentWithAllChildrenInSelectMode();
+               $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']);
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
 
                $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
                $this->assertResponseContentStructureHasRecords(
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContent.csv
deleted file mode 100644 (file)
index 08d8861..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
-,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
-,4,89,1280,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,"Hotel #1",298,tt_content,,1
-,6,89,1,0,1,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,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
-,6,89,1536,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
-,8,89,1024,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
-,9,89,1,0,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
-,8,89,1792,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
-,10,89,768,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
-,12,89,1024,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
-,14,89,1,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentKeep.csv
new file mode 100644 (file)
index 0000000..bc86e18
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentSelect.csv
new file mode 100644 (file)
index 0000000..bc86e18
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildrenKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildrenKeep.csv
new file mode 100644 (file)
index 0000000..bc86e18
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildrenSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildrenSelect.csv
new file mode 100644 (file)
index 0000000..08d8861
--- /dev/null
@@ -0,0 +1,28 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,1280,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,"Hotel #1",298,tt_content,,1
+,6,89,1,0,1,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,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,1536,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1024,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,89,1,0,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,1792,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,768,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1024,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
+,14,89,1,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer,
index 1298a99..d8ba574 100644 (file)
@@ -130,12 +130,60 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
-        * @see DataSet/Assertion/localizeParentContentRecord.csv
+        * @see DataSet/localizeParentContentKeep.csv
         */
-       public function localizeParentContent() {
-               parent::localizeParentContent();
+       public function localizeParentContentInKeepMode() {
+               parent::localizeParentContentInKeepMode();
                $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
-               $this->assertAssertionDataSet('localizeParentContent');
+               $this->assertAssertionDataSet('localizeParentContentKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenKeep.csv
+        */
+       public function localizeParentContentWithAllChildrenInKeepMode() {
+               parent::localizeParentContentWithAllChildrenInKeepMode();
+               $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenKeep');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentSelect.csv
+        */
+       public function localizeParentContentInSelectMode() {
+               parent::localizeParentContentInSelectMode();
+               $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+               $this->assertAssertionDataSet('localizeParentContentSelect');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
+               $this->assertResponseContentStructureDoesNotHaveRecords(
+                       $responseContent, self::TABLE_Content . ':' . self::VALUE_ContentIdLast, self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('[Translate to Dansk:] Hotel #1')
+               );
+       }
+
+       /**
+        * @test
+        * @see DataSet/localizeParentContentWAllChildrenSelect.csv
+        */
+       public function localizeParentContentWithAllChildrenInSelectMode() {
+               parent::localizeParentContentWithAllChildrenInSelectMode();
+               $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+               $this->assertAssertionDataSet('localizeParentContentWAllChildrenSelect');
 
                $responseContent = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseContent();
                $this->assertResponseContentStructureHasRecords(
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContent.csv
deleted file mode 100644 (file)
index 08d8861..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-tt_content
-,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
-,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
-,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
-,4,89,1280,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,"Hotel #1",298,tt_content,,1
-,6,89,1,0,1,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,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
-,6,89,1536,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
-,8,89,1024,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
-,9,89,1,0,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
-,8,89,1792,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
-,10,89,768,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
-,12,89,1024,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
-,14,89,1,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentKeep.csv
new file mode 100644 (file)
index 0000000..bc86e18
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentSelect.csv
new file mode 100644 (file)
index 0000000..bc86e18
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildrenKeep.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildrenKeep.csv
new file mode 100644 (file)
index 0000000..bc86e18
--- /dev/null
@@ -0,0 +1,25 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,2,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,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildrenSelect.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildrenSelect.csv
new file mode 100644 (file)
index 0000000..08d8861
--- /dev/null
@@ -0,0 +1,28 @@
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,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,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,89,768,0,1,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,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,"Hotel #1",297,tt_content,,2
+,4,89,1280,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,"Hotel #1",298,tt_content,,1
+,6,89,1,0,1,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,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,1536,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1024,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,89,1,0,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,1792,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,768,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1024,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
+,14,89,1,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/MToNMMTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/MToNMMTest.php
deleted file mode 100644 (file)
index ae7c5d2..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-<?php
-namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE;
-
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2013 Oliver Hader <oliver@typo3.org>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-require_once(dirname(__FILE__). '/AbstractTestCase.php');
-
-/**
- * Test case for m:n MM relations
- *
- */
-class MToNMMTest extends AbstractTestCase {
-       const TABLE_Hotel = 'tx_irretutorial_mnmmasym_hotel';
-       const TABLE_Offer = 'tx_irretutorial_mnmmasym_offer';
-       const TABLE_Price = 'tx_irretutorial_mnmmasym_price';
-       const TABLE_Relation_Hotel_Offer = 'tx_irretutorial_mnmmasym_hotel_offer_rel';
-       const TABLE_Relation_Offer_Price = 'tx_irretutorial_mnmmasym_offer_price_rel';
-
-       const FIELD_Hotel_Offers = 'offers';
-       const FIELD_Offer_Hotels = 'hotels';
-       const FIELD_Offer_Prices = 'prices';
-       const FIELD_Price_Offers = 'offers';
-
-       /**
-        * @var array
-        */
-       protected $structure = array(
-               self::TABLE_Hotel => array(self::FIELD_Hotel_Offers),
-               self::TABLE_Offer => array(self::FIELD_Offer_Hotels, self::FIELD_Offer_Prices),
-               self::TABLE_Price => array(self::FIELD_Price_Offers),
-       );
-
-       /**
-        * Sets up this test case.
-        *
-        * @return void
-        */
-       public function setUp() {
-               parent::setUp();
-
-               $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/DataHandling/IRRE/Fixtures/MToNMMAsymmetric.xml');
-       }
-
-       /**
-        * @test
-        */
-       public function isManyToManyRelationUpdatedForVersionedRecordsOnLocalSide() {
-               $this->markTestSkipped('This test is failing - the Core needs to be fixed');
-               $editingElements = array(
-                       self::TABLE_Hotel => 1,
-               );
-               $tceMain = $this->simulateEditing($editingElements);
-               $versionedHotelId = $tceMain->getAutoVersionId(self::TABLE_Hotel, 1);
-
-               $this->assertGreaterThan(1, $versionedHotelId);
-               $this->assertArrayHasValues(
-                       array(
-                               $versionedHotelId . '->' . '1',
-                               $versionedHotelId . '->' . '2',
-                       ),
-                       $this->getManyToManyRelations(self::TABLE_Relation_Hotel_Offer)
-               );
-       }
-
-       /**
-        * @test
-        */
-       public function isManyToManyRelationUpdatedForVersionedRecordsOnForeignSide() {
-               $this->markTestSkipped('This test is failing - the Core needs to be fixed');
-               $editingElements = array(
-                       self::TABLE_Offer => 1,
-               );
-
-               $tceMain = $this->simulateEditing($editingElements);
-               $versionedOfferId = $tceMain->getAutoVersionId(self::TABLE_Offer, 1);
-
-               $this->assertGreaterThan(1, $versionedOfferId);
-               $this->assertArrayHasValues(
-                       array(
-                               '1' . '->' . $versionedOfferId,
-                               '1' . '->' . '2',
-                       ),
-                       $this->getManyToManyRelations(self::TABLE_Relation_Hotel_Offer)
-               );
-       }
-
-       /**
-        * @test
-        */
-       public function isManyToManyRelationUpdatedForVersionedRecordsOnBothSides() {
-               $this->markTestSkipped('This test is failing - the Core needs to be fixed');
-               $editingElements = array(
-                       self::TABLE_Hotel => 1,
-                       self::TABLE_Offer => 1,
-               );
-
-               $tceMain = $this->simulateEditing($editingElements);
-               $versionedHotelId = $tceMain->getAutoVersionId(self::TABLE_Hotel, 1);
-               $versionedOfferId = $tceMain->getAutoVersionId(self::TABLE_Offer, 1);
-
-               $this->assertGreaterThan(1, $versionedHotelId);
-               $this->assertGreaterThan(2, $versionedOfferId);
-               $this->assertArrayHasValues(
-                       array(
-                               $versionedHotelId . '->' . $versionedOfferId,
-                               $versionedHotelId . '->' . '2',
-                       ),
-                       $this->getManyToManyRelations(self::TABLE_Relation_Hotel_Offer)
-               );
-       }
-
-       /**
-        * @test
-        */
-       public function isManyToManyRelationUpdatedForVersionedRecordsOnBothSidesWithDifferentRelations() {
-               $this->markTestSkipped('This test is failing - the Core needs to be fixed');
-
-               $editingElements = array(
-                       self::TABLE_Hotel => 1,
-                       self::TABLE_Offer => 1,
-               );
-
-               $modificationStructure = array(
-                       self::TABLE_Hotel => array(
-                               1 => array(
-                                       self::FIELD_Hotel_Offers => '1',
-                               ),
-                       ),
-               );
-
-               $tceMain = $this->simulateEditing($editingElements);
-               $versionedHotelId = $tceMain->getAutoVersionId(self::TABLE_Hotel, 1);
-               $versionedOfferId = $tceMain->getAutoVersionId(self::TABLE_Offer, 1);
-
-               $tceMain = $this->simulateEditingByStructure($modificationStructure);
-               $relations = $this->getManyToManyRelations(self::TABLE_Relation_Hotel_Offer);
-
-               $this->assertGreaterThan(1, $versionedHotelId);
-               $this->assertGreaterThan(2, $versionedOfferId);
-               $this->assertArrayHasValues(
-                       array(
-                               $versionedHotelId . '->' . $versionedOfferId,
-                       ),
-                       $relations
-               );
-
-               $this->assertArrayDoesNotHaveValues(
-                       array(
-                               $versionedHotelId . '->' . '2',
-                       ),
-                       $relations
-               );
-       }
-
-       /**
-        * @param string $tableName
-        * @return array
-        */
-       protected function getManyToManyRelations($tableName) {
-               $relations = array();
-
-               foreach ($this->getAllRecords($tableName) as $relation) {
-                       $relations[] = $relation['uid_local'] . '->' . $relation['uid_foreign'];
-               }
-
-               return $relations;
-       }
-
-       /**
-        * @param array $expected
-        * @param array $actual
-        */
-       protected function assertArrayHasValues(array $expected, array $actual) {
-               $differences = array_diff($expected, $actual);
-
-               if (count($differences) > 0) {
-                       $this->fail('Unmatched values: ' . implode(', ', $differences));
-               }
-       }
-
-       /**
-        * @param array $unexpected
-        * @param array $actual
-        */
-       protected function assertArrayDoesNotHaveValues(array $unexpected, array $actual) {
-               $intersection = array_intersect($unexpected, $actual);
-
-               if (count($intersection) > 0) {
-                       $this->fail('Unexpected values: ' . implode(', ', $intersection));
-               }
-       }
-}
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/OneToNCSVTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/OneToNCSVTest.php
deleted file mode 100644 (file)
index 4d76da5..0000000
+++ /dev/null
@@ -1,472 +0,0 @@
-<?php
-namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE;
-
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Oliver Hader <oliver@typo3.org>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-require_once(dirname(__FILE__). '/AbstractOneToNTestCase.php');
-
-/**
- * Test case for 1:n csv relations.
- *
- */
-class OneToNCSVTest extends AbstractOneToNTestCase {
-       const TABLE_Hotel = 'tx_irretutorial_1ncsv_hotel';
-       const TABLE_Offer = 'tx_irretutorial_1ncsv_offer';
-       const TABLE_Price = 'tx_irretutorial_1ncsv_price';
-
-       /**
-        * Sets up this test case.
-        *
-        * @return void
-        */
-       public function setUp() {
-               parent::setUp();
-
-               $this->importDataSet(dirname(__FILE__) . '/Fixtures/OneToNCSV.xml');
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function areAllChildrenVersionizedWithParent() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $liveElements = $this->versionizeAllChildrenWithParent();
-               $this->assertWorkspaceVersions($liveElements);
-
-               $versionizedHotelId = $this->getWorkspaceVersionId(self::TABLE_Hotel, 1);
-
-               // Workspace:
-               $this->assertChildren(
-                       self::TABLE_Hotel, $versionizedHotelId, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       't3ver_oid' => 2,
-                                       't3_origuid' => 2,
-                                       self::FIELD_Offers_Prices => $this->getWorkspaceVersionId(self::TABLE_Price, 1) . ',' . $this->getWorkspaceVersionId(self::TABLE_Price, 2),
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       't3ver_oid' => 1,
-                                       't3_origuid' => 1,
-                                       self::FIELD_Offers_Prices => $this->getWorkspaceVersionId(self::TABLE_Price, 3),
-                               ),
-                       )
-               );
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function areExistingChildVersionsUsedOnParentVersioning() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $childElements = array(
-                       self::TABLE_Offer => '1',
-               );
-
-               $this->simulateEditing($childElements);
-               $this->assertWorkspaceVersions($childElements);
-
-               // Live:
-               $this->assertChildren(
-                       self::TABLE_Hotel, 1, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => 2,
-                                       't3ver_id' => 0,
-                                       self::FIELD_Offers_Prices => '1,2',
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => 1,
-                                       't3ver_id' => 0,
-                                       self::FIELD_Offers_Prices => '3',
-                               ),
-                       )
-               );
-
-               $versionizedOfferId = $this->getWorkspaceVersionId(self::TABLE_Offer, 1);
-               $versionizedPriceId = $this->getWorkspaceVersionId(self::TABLE_Price, 3);
-
-               $liveElements = array(
-                       self::TABLE_Hotel => '1',
-                       self::TABLE_Offer => '2',
-                       self::TABLE_Price => '1,2',
-               );
-               $liveElementsToBeVersionized = $liveElements;
-               $liveElementsToBeVersionized[self::TABLE_Offer] .= ',' . $versionizedOfferId;
-               $liveElementsToBeVersionized[self::TABLE_Price] .= ',' . $versionizedPriceId;
-
-               $this->simulateEditing($liveElementsToBeVersionized);
-               $this->assertWorkspaceVersions($liveElements);
-
-               $versionizedHotelId = $this->getWorkspaceVersionId(self::TABLE_Hotel, 1);
-
-               // Workspace:
-               $this->assertChildren(
-                       self::TABLE_Hotel, $versionizedHotelId, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       't3ver_oid' => 2,
-                                       't3_origuid' => 2,
-                                       't3ver_id' => 1,
-                                       self::FIELD_Offers_Prices => $this->getWorkspaceVersionId(self::TABLE_Price, 1) . ',' . $this->getWorkspaceVersionId(self::TABLE_Price, 2),
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       't3ver_oid' => 1,
-                                       't3_origuid' => 1,
-                                       't3ver_id' => 1,
-                                       self::FIELD_Offers_Prices => $versionizedPriceId,
-                               ),
-                       )
-               );
-       }
-
-       /****************************************************************
-        * COPY Behaviour
-        ****************************************************************/
-
-       /**
-        * @test
-        */
-       public function liveRecordsAreCopied() {
-               $this->markTestSkipped('This test is failing - the Core needs to be fixed');
-
-               $tceMain = $this->simulateCommand(
-                       self::COMMAND_Copy,
-                       -1,
-                       array(
-                               self::TABLE_Hotel => 1
-                       )
-               );
-
-               $placeholderHotelId = $tceMain->copyMappingArray_merged[self::TABLE_Hotel][1];
-               $versionizedHotelId = $tceMain->getAutoVersionId(self::TABLE_Hotel, $placeholderHotelId);
-
-               $this->assertGreaterThan($placeholderHotelId, $versionizedHotelId);
-
-               $placeholderOfferIdA = $tceMain->copyMappingArray_merged[self::TABLE_Offer][1];
-               $placeholderOfferIdB = $tceMain->copyMappingArray_merged[self::TABLE_Offer][2];
-               $placeholderPriceId = $tceMain->copyMappingArray_merged[self::TABLE_Price][3];
-
-               $this->assertGreaterThan(0, $placeholderOfferIdA, 'Seems like child reference have not been considered');
-               $this->assertGreaterThan(0, $placeholderOfferIdB, 'Seems like child reference have not been considered');
-               $this->assertGreaterThan(0, $placeholderPriceId, 'Seems like child reference have not been considered');
-
-               $versionizedOfferIdA = $tceMain->getAutoVersionId(self::TABLE_Offer, $placeholderOfferIdA);
-               $versionizedOfferIdB = $tceMain->getAutoVersionId(self::TABLE_Offer, $placeholderOfferIdB);
-               $versionizedPriceId = $tceMain->getAutoVersionId(self::TABLE_Price, $placeholderPriceId);
-
-               /**
-                * Placeholder (Live)
-                */
-
-               $this->assertRecords(
-                       array(
-                               self::TABLE_Hotel => array(
-                                       $placeholderHotelId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => 1,
-                                       ),
-                                       $versionizedHotelId => array(
-                                               'pid' => -1,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => -1,
-                                               self::FIELD_Hotel_Offers => $versionizedOfferIdA . ',' . $versionizedOfferIdB,
-                                       ),
-                               ),
-                               self::TABLE_Offer => array(
-                                       $placeholderOfferIdA => array(
-                                               'pid' => self::VALUE_Pid,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                       ),
-                                       $placeholderOfferIdB => array(
-                                               'pid' => self::VALUE_Pid,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                       ),
-                               ),
-                               self::TABLE_Price => array(
-                                       $placeholderPriceId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                       ),
-                               ),
-                       )
-               );
-
-               /**
-                * Workspace (Version)
-                */
-
-               $this->assertChildren(
-                       self::TABLE_Hotel, $versionizedHotelId, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => $versionizedOfferIdA,
-                                       'pid' => -1,
-                                       't3ver_id' => 1,
-                                       't3ver_oid' => $placeholderOfferIdA,
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => $versionizedOfferIdB,
-                                       'pid' => -1,
-                                       't3ver_id' => 1,
-                                       't3ver_oid' => $placeholderOfferIdB,
-                               ),
-                       )
-               );
-
-               $this->assertChildren(
-                       self::TABLE_Offer, $versionizedOfferIdB, self::FIELD_Offers_Prices,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Price,
-                                       'uid' => $versionizedPriceId,
-                                       'pid' => -1,
-                                       't3ver_id' => 1,
-                                       't3ver_oid' => $placeholderPriceId,
-                               ),
-                       )
-               );
-
-               $this->assertReferenceIndex(
-                       array(
-                               $this->combine(self::TABLE_Hotel, $versionizedHotelId, 'offers') => array(
-                                       $this->combine(self::TABLE_Offer, $versionizedOfferIdA),
-                                       $this->combine(self::TABLE_Offer, $versionizedOfferIdB),
-                               ),
-                               $this->combine(self::TABLE_Offer, $versionizedOfferIdB, 'prices') => array(
-                                       $this->combine(self::TABLE_Price, $versionizedPriceId),
-                               ),
-                       )
-               );
-       }
-
-       /**
-        * @test
-        */
-       public function liveRecordsAreCopiedToDifferentPage() {
-               $this->markTestSkipped('This test is failing - the Core needs to be fixed');
-
-               $tceMain = $this->simulateCommand(
-                       self::COMMAND_Copy,
-                       self::VALUE_PidAlternative,
-                       array(
-                               self::TABLE_Hotel => 1
-                       )
-               );
-
-               $placeholderHotelId = $tceMain->copyMappingArray_merged[self::TABLE_Hotel][1];
-               $versionizedHotelId = $tceMain->getAutoVersionId(self::TABLE_Hotel, $placeholderHotelId);
-
-               $this->assertGreaterThan($placeholderHotelId, $versionizedHotelId);
-
-               $placeholderOfferIdA = $tceMain->copyMappingArray_merged[self::TABLE_Offer][1];
-               $placeholderOfferIdB = $tceMain->copyMappingArray_merged[self::TABLE_Offer][2];
-               $placeholderPriceId = $tceMain->copyMappingArray_merged[self::TABLE_Price][3];
-
-               $this->assertGreaterThan(0, $placeholderOfferIdA, 'Seems like child reference have not been considered');
-               $this->assertGreaterThan(0, $placeholderOfferIdB, 'Seems like child reference have not been considered');
-               $this->assertGreaterThan(0, $placeholderPriceId, 'Seems like child reference have not been considered');
-
-               $versionizedOfferIdA = $tceMain->getAutoVersionId(self::TABLE_Offer, $placeholderOfferIdA);
-               $versionizedOfferIdB = $tceMain->getAutoVersionId(self::TABLE_Offer, $placeholderOfferIdB);
-
-               /**
-                * Placeholder (Live)
-                */
-
-               $this->assertRecords(
-                       array(
-                               self::TABLE_Hotel => array(
-                                       $placeholderHotelId => array(
-                                               'pid' => self::VALUE_PidAlternative,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => 1,
-                                       ),
-                                       $versionizedHotelId => array(
-                                               'pid' => -1,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => -1,
-                                               self::FIELD_Hotel_Offers => $versionizedOfferIdA . ',' . $versionizedOfferIdB,
-                                       ),
-                               ),
-                               self::TABLE_Offer => array(
-                                       $placeholderOfferIdA => array(
-                                               'pid' => self::VALUE_PidAlternative,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                       ),
-                                       $placeholderOfferIdB => array(
-                                               'pid' => self::VALUE_PidAlternative,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                       ),
-                               ),
-                               self::TABLE_Price => array(
-                                       $placeholderPriceId => array(
-                                               'pid' => self::VALUE_PidAlternative,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                       ),
-                               ),
-                       )
-               );
-       }
-
-       /****************************************************************
-        * PUBLISH/SWAP/CLEAR Behaviour
-        ****************************************************************/
-
-       /**
-        * @return void
-        * @test
-        */
-       public function isChildPublishedSeparatelyIfParentIsNotVersionized() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $childElements = array(
-                       self::TABLE_Offer => '1',
-               );
-               $this->simulateEditing($childElements);
-
-               $versionizedOfferId = $this->getWorkspaceVersionId(self::TABLE_Offer, 1);
-               $versionizedPriceId = $this->getWorkspaceVersionId(self::TABLE_Price, 3);
-
-               $this->simulateCommandByStructure(array(
-                       self::TABLE_Price => array(
-                               '3' => array(
-                                       'version' => array(
-                                               'action' => self::COMMAND_Version_Swap,
-                                               'swapWith' => $versionizedPriceId,
-                                               'notificationAlternativeRecipients' => array(),
-                                       )
-                               )
-                       ),
-                       self::TABLE_Offer => array(
-                               '1' => array(
-                                       'version' => array(
-                                               'action' => self::COMMAND_Version_Swap,
-                                               'swapWith' => $versionizedOfferId,
-                                               'notificationAlternativeRecipients' => array(),
-                                       )
-                               )
-                       ),
-               ));
-
-               // Live:
-               $this->assertChildren(
-                       self::TABLE_Hotel, 1, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => 2,
-                                       't3ver_oid' => 0,
-                                       't3_origuid' => 0,
-                                       't3ver_id' => 0,
-                                       self::FIELD_Offers_Prices => '1,2',
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => 1,
-                                       't3ver_oid' => 0,
-                                       't3_origuid' => 1,
-                                       't3ver_id' => 1, // it was published
-                                       't3ver_label' => 'Auto-created for WS #' . self::VALUE_WorkspaceId,
-                                       self::FIELD_Offers_Prices => '3',
-                               ),
-                       )
-               );
-       }
-
-       /**
-        * @return void
-        * @test
-        */
-       public function isChildSwappedSeparatelyIfParentIsNotVersionized() {
-               $this->markTestSkipped('Will be replaced by ActionTests...');
-
-               $childElements = array(
-                       self::TABLE_Offer => '1',
-               );
-               $this->simulateEditing($childElements);
-
-               $versionizedOfferId = $this->getWorkspaceVersionId(self::TABLE_Offer, 1);
-               $versionizedPriceId = $this->getWorkspaceVersionId(self::TABLE_Price, 3);
-
-               $this->simulateCommandByStructure(array(
-                       self::TABLE_Price => array(
-                               '3' => array(
-                                       'version' => array(
-                                               'action' => self::COMMAND_Version_Swap,
-                                               'swapWith' => $versionizedPriceId,
-                                               'swapIntoWS' => 1,
-                                               'notificationAlternativeRecipients' => array(),
-                                       )
-                               )
-                       ),
-                       self::TABLE_Offer => array(
-                               '1' => array(
-                                       'version' => array(
-                                               'action' => self::COMMAND_Version_Swap,
-                                               'swapWith' => $versionizedOfferId,
-                                               'swapIntoWS' => 1,
-                                               'notificationAlternativeRecipients' => array(),
-                                       )
-                               )
-                       ),
-               ));
-
-               // Live:
-               $this->assertChildren(
-                       self::TABLE_Hotel, 1, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => 1,
-                                       't3ver_oid' => 0,
-                                       't3_origuid' => 1,
-                                       't3ver_id' => 1, // it was published
-                                       't3ver_label' => 'Auto-created for WS #' . self::VALUE_WorkspaceId,
-                                       self::FIELD_Offers_Prices => '3',
-                               ),
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => 2,
-                                       't3ver_oid' => 0,
-                                       't3_origuid' => 0,
-                                       't3ver_id' => 0,
-                                       self::FIELD_Offers_Prices => '1,2',
-                               ),
-                       )
-               );
-       }
-}
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/OneToNForeignFieldTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/OneToNForeignFieldTest.php
deleted file mode 100644 (file)
index 05fd4d7..0000000
+++ /dev/null
@@ -1,1552 +0,0 @@
-<?php
-namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE;
-
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Oliver Hader <oliver@typo3.org>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-require_once(dirname(__FILE__). '/AbstractOneToNTestCase.php');
-
-/**
- * Test case for 1:n ff relations.
- *
- */
-class OneToNForeignFieldTest extends AbstractOneToNTestCase {
-       const TABLE_Hotel = 'tx_irretutorial_1nff_hotel';
-       const TABLE_Offer = 'tx_irretutorial_1nff_offer';
-       const TABLE_Price = 'tx_irretutorial_1nff_price';
-
-       const FIELD_Pages_Hotels = 'tx_irretutorial_hotels';
-
-       const FIELD_Hotels_ParentId = 'parentid';
-       const FIELD_Offers_ParentId = 'parentid';
-       const FIELD_Prices_ParentId = 'parentid';
-       const FIELD_Hotels_ParentTable = 'parenttable';
-       const FIELD_Offers_ParentTable = 'parenttable';
-       const FIELD_Prices_ParentTable = 'parenttable';
-
-       /**
-        * Sets up this test case.
-        *
-        * @return void
-        */
-       public function setUp() {
-               parent::setUp();
-
-               $this->importDataSet(dirname(__FILE__) . '/Fixtures/OneToNForeignField.xml');
-       }
-
-       /**
-        * @param boolean $value
-        */
-       protected function setLocalizeChildrenAtParentLocalization($value) {
-               $this->setTcaFieldConfigurationBehaviour(
-                       self::TABLE_Hotel,
-                       self::FIELD_Hotel_Offers,
-                       self::BEHAVIOUR_LocalizeChildrenAtParentLocalization,
-                       (bool) $value
-               );
-
-               $this->setTcaFieldConfigurationBehaviour(
-                       self::TABLE_Offer,
-                       self::FIELD_Offers_Prices,
-                       self::BEHAVIOUR_LocalizeChildrenAtParentLocalization,
-                       (bool) $value
-               );
-       }
-
-       /****************************************************************
-        * CREATE Behaviour
-        ****************************************************************/
-
-       /**
-        * @param boolean $returnIds
-        * @return NULL|array
-        * @test
-        */
-       public function versionRecordsAndPlaceholdersAreCreated($returnIds = FALSE) {
-               $this->markTestSkipped('This test is failing - the Core needs to be fixed');
-
-               $newHotelId = uniqid('NEW');
-               $newOfferId = uniqid('NEW');
-               $newPriceId = uniqid('NEW');
-
-               $tceMain = $this->simulateEditingByStructure(
-                       array(
-                               self::TABLE_Hotel => array(
-                                       $newHotelId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               'title' => 'HOTEL',
-                                               self::FIELD_Hotel_Offers => $newOfferId,
-                                       ),
-                               ),
-                               self::TABLE_Offer => array(
-                                       $newOfferId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               'title' => 'OFFER',
-                                               self::FIELD_Offers_Prices => $newPriceId,
-                                       ),
-                               ),
-                               self::TABLE_Price => array(
-                                       $newPriceId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               'title' => 'PRICE',
-                                       ),
-                               ),
-                       )
-               );
-
-               $placeholderHotelId = $tceMain->substNEWwithIDs[$newHotelId];
-               $placeholderOfferId = $tceMain->substNEWwithIDs[$newOfferId];
-               $placeholderPriceId = $tceMain->substNEWwithIDs[$newPriceId];
-
-               $versionizedHotelId = $tceMain->getAutoVersionId(self::TABLE_Hotel, $placeholderHotelId);
-               $versionizedOfferId = $tceMain->getAutoVersionId(self::TABLE_Offer, $placeholderOfferId);
-               $versionizedPriceId = $tceMain->getAutoVersionId(self::TABLE_Price, $placeholderPriceId);
-
-               // Skip assertions if requested
-               if ($returnIds === TRUE) {
-                       return array(
-                               'placeholderHotelId' => $placeholderHotelId,
-                               'placeholderOfferId' => $placeholderOfferId,
-                               'placeholderPriceId' => $placeholderPriceId,
-                       );
-               }
-
-               /**
-                * Placeholder (Live)
-                */
-
-               $this->assertRecords(
-                       array(
-                               self::TABLE_Hotel => array(
-                                       $placeholderHotelId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => 1,
-                                       ),
-                                       $versionizedHotelId => array(
-                                               'pid' => -1,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => -1,
-                                               self::FIELD_Hotel_Offers => 1,
-                                       ),
-                               ),
-                               self::TABLE_Offer => array(
-                                       $placeholderOfferId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => 1,
-                                               self::FIELD_Offers_ParentId => $versionizedHotelId,
-                                               self::FIELD_Offers_ParentTable => self::TABLE_Hotel,
-                                       ),
-                               ),
-                               self::TABLE_Price => array(
-                                       $placeholderPriceId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => 1,
-                                               self::FIELD_Prices_ParentId => $versionizedOfferId,
-                                               self::FIELD_Prices_ParentTable => self::TABLE_Offer,
-                                       ),
-                               ),
-                       )
-               );
-
-               /**
-                * Workspace (Version)
-                */
-
-               $this->assertChildren(
-                       self::TABLE_Hotel, $versionizedHotelId, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => $versionizedOfferId,
-                                       'pid' => -1,
-                                       't3ver_id' => 1,
-                                       't3ver_oid' => $placeholderOfferId,
-                                       self::FIELD_Offers_ParentId => $versionizedHotelId,
-                                       self::FIELD_Offers_ParentTable => self::TABLE_Hotel,
-                               ),
-                       )
-               );
-
-               $this->assertChildren(
-                       self::TABLE_Offer, $versionizedOfferId, self::FIELD_Offers_Prices,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Price,
-                                       'uid' => $versionizedPriceId,
-                                       'pid' => -1,
-                                       't3ver_id' => 1,
-                                       't3ver_oid' => $placeholderPriceId,
-                                       self::FIELD_Prices_ParentId => $versionizedOfferId,
-                                       self::FIELD_Prices_ParentTable => self::TABLE_Offer,
-                               ),
-                       )
-               );
-
-               $this->assertReferenceIndex(
-                       array(
-                               $this->combine(self::TABLE_Hotel, $versionizedHotelId, 'offers') => array(
-                                       $this->combine(self::TABLE_Offer, $versionizedOfferId),
-                               ),
-                               $this->combine(self::TABLE_Offer, $versionizedOfferId, 'prices') => array(
-                                       $this->combine(self::TABLE_Price, $versionizedPriceId),
-                               ),
-                       )
-               );
-
-               return NULL;
-       }
-
-       /**
-        * @test
-        */
-       public function versionRecordsAndPlaceholdersAreCreatedAndCopied() {
-               $this->markTestSkipped('This test is failing - the Core needs to be fixed');
-
-               $originalIds = $this->versionRecordsAndPlaceholdersAreCreated(TRUE);
-               $originalPlaceholderHotelId = $originalIds['placeholderHotelId'];
-
-               $tceMain = $this->simulateCommand(
-                       self::COMMAND_Copy,
-                       -$originalPlaceholderHotelId,
-                       array(
-                               self::TABLE_Hotel => $originalPlaceholderHotelId
-                       )
-               );
-
-               $placeholderHotelId = $tceMain->copyMappingArray_merged[self::TABLE_Hotel][$originalPlaceholderHotelId];
-               $versionizedHotelId = $tceMain->getAutoVersionId(self::TABLE_Hotel, $placeholderHotelId);
-
-               $this->assertGreaterThan($placeholderHotelId, $versionizedHotelId);
-
-               $placeholderOfferId = current($tceMain->copyMappingArray_merged[self::TABLE_Offer]);
-               $placeholderPriceId = current($tceMain->copyMappingArray_merged[self::TABLE_Price]);
-
-               $this->assertGreaterThan(0, $placeholderOfferId, 'Seems like child reference have not been considered');
-               $this->assertGreaterThan(0, $placeholderPriceId, 'Seems like child reference have not been considered');
-
-               $versionizedOfferId = $tceMain->getAutoVersionId(self::TABLE_Offer, $placeholderOfferId);
-               $versionizedPriceId = $tceMain->getAutoVersionId(self::TABLE_Price, $placeholderPriceId);
-
-               /**
-                * Placeholder (Live)
-                */
-
-               $this->assertRecords(
-                       array(
-                               self::TABLE_Hotel => array(
-                                       $placeholderHotelId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => 1,
-                                       ),
-                                       $versionizedHotelId => array(
-                                               'pid' => -1,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => -1,
-                                               self::FIELD_Hotel_Offers => 1,
-                                       ),
-                               ),
-                               self::TABLE_Offer => array(
-                                       $placeholderOfferId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                       ),
-                               ),
-                               self::TABLE_Price => array(
-                                       $placeholderPriceId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                       ),
-                               ),
-                       )
-               );
-
-               /**
-                * Workspace (Version)
-                */
-
-               $this->assertChildren(
-                       self::TABLE_Hotel, $versionizedHotelId, self::FIELD_Hotel_Offers,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Offer,
-                                       'uid' => $versionizedOfferId,
-                                       'pid' => -1,
-                                       't3ver_id' => 1,
-                                       't3ver_oid' => $placeholderOfferId,
-                                       self::FIELD_Offers_ParentId => $versionizedHotelId,
-                                       self::FIELD_Offers_ParentTable => self::TABLE_Hotel,
-                               ),
-                       )
-               );
-
-               $this->assertChildren(
-                       self::TABLE_Offer, $versionizedOfferId, self::FIELD_Offers_Prices,
-                       array(
-                               array(
-                                       'tableName' => self::TABLE_Price,
-                                       'uid' => $versionizedPriceId,
-                                       'pid' => -1,
-                                       't3ver_id' => 1,
-                                       't3ver_oid' => $placeholderPriceId,
-                                       self::FIELD_Prices_ParentId => $versionizedOfferId,
-                                       self::FIELD_Prices_ParentTable => self::TABLE_Offer,
-                               ),
-                       )
-               );
-
-               $this->assertReferenceIndex(
-                       array(
-                               $this->combine(self::TABLE_Hotel, $versionizedHotelId, 'offers') => array(
-                                       $this->combine(self::TABLE_Offer, $versionizedOfferId),
-                               ),
-                               $this->combine(self::TABLE_Offer, $versionizedOfferId, 'prices') => array(
-                                       $this->combine(self::TABLE_Price, $versionizedPriceId),
-                               ),
-                       )
-               );
-       }
-
-       /**
-        * @param boolean $returnIds
-        * @return NULL|array
-        * @test
-        */
-       public function versionRecordsAndPlaceholdersAreCreatedAndLocalized($returnIds = FALSE) {
-               $this->markTestSkipped('This test is failing - the Core needs to be fixed');
-
-               $this->setLocalizeChildrenAtParentLocalization(TRUE);
-               $originalIds = $this->versionRecordsAndPlaceholdersAreCreated(TRUE);
-               $originalPlaceholderHotelId = $originalIds['placeholderHotelId'];
-               $originalPlaceholderOfferId = $originalIds['placeholderOfferId'];
-               $originalPlaceholderPriceId = $originalIds['placeholderPriceId'];
-
-               $tceMain = $this->simulateCommand(
-                       self::COMMAND_Localize,
-                       self::VALUE_LanguageId,
-                       array(
-                               self::TABLE_Hotel => $originalPlaceholderHotelId
-                       )
-               );
-
-               $placeholderHotelId = $tceMain->copyMappingArray_merged[self::TABLE_Hotel][$originalPlaceholderHotelId];
-               $versionizedHotelId = $tceMain->getAutoVersionId(self::TABLE_Hotel, $placeholderHotelId);
-
-               $this->assertGreaterThan($placeholderHotelId, $versionizedHotelId);
-
-               $placeholderOfferId = current($tceMain->copyMappingArray_merged[self::TABLE_Offer]);
-               $placeholderPriceId = current($tceMain->copyMappingArray_merged[self::TABLE_Price]);
-
-               $this->assertGreaterThan(0, $placeholderOfferId, 'Seems like child reference have not been considered');
-               $this->assertGreaterThan(0, $placeholderPriceId, 'Seems like child reference have not been considered');
-
-               $versionizedOfferId = $tceMain->getAutoVersionId(self::TABLE_Offer, $placeholderOfferId);
-               $versionizedPriceId = $tceMain->getAutoVersionId(self::TABLE_Price, $placeholderPriceId);
-
-               // Skip assertions if requested
-               if ($returnIds === TRUE) {
-                       return array(
-                               'originalPlaceholderHotelId' => $originalPlaceholderHotelId,
-                               'originalPlaceholderOfferId' => $originalPlaceholderOfferId,
-                               'originalPlaceholderPriceId' => $originalPlaceholderPriceId,
-                               'placeholderHotelId' => $placeholderHotelId,
-                               'placeholderOfferId' => $placeholderOfferId,
-                               'placeholderPriceId' => $placeholderPriceId,
-                               'versionizedHotelId' => $versionizedHotelId,
-                               'versionizedOfferId' => $versionizedOfferId,
-                               'versionizedPriceId' => $versionizedPriceId,
-                       );
-               }
-
-               /**
-                * Placeholder (Live)
-                */
-
-               $this->assertRecords(
-                       array(
-                               self::TABLE_Hotel => array(
-                                       $placeholderHotelId => array(
-                                               'pid' => self::VALUE_Pid,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => 1,
-                                               'l18n_parent' => $originalPlaceholderHotelId,
-                                               'sys_language_uid' => self::VALUE_LanguageId,
-                                       ),
-                                       $versionizedHotelId => array(
-                                               'pid' => -1,
-                                               't3ver_wsid' => self::VALUE_WorkspaceId,
-                                               't3ver_state' => -1,
-                                               'l18n_parent' => $originalPlaceholderHotelId,
-                                               'sys_language_uid' => self::VALUE_LanguageId,
-                                               self::FIELD_Hotel_Offers => 1,
-                                       ),
-                               ),
-                               self::TABLE_Offer => array(
-                                       $placeholderOfferId => array(
-                                           &nb