[TASK] Add functional test cases to DataHandler (live) 88/27188/13
authorOliver Hader <oliver@typo3.org>
Fri, 31 Jan 2014 11:50:32 +0000 (12:50 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Sun, 2 Feb 2014 15:38:48 +0000 (16:38 +0100)
This change-set adds new functional tests for the DataHandler
to ensure the correct behaviour in the Live Workspace. The
difference to current functional tests is, that here a more
complete picture is checked in the database instead of only
particular ids and values.

The tests use a DataSet, which is basically only a CSV file
that hold the record values for required tables. These CSV
files can easily be modified by any spreadsheet application.
The "Scenario" DataSets are used to define the scenario each
test case is based on - the "Assertion" DataSets are used to
acutally assert that the correct processing was done in
the DataHandler.

Resolves: #54855
Releases: 6.2
Change-Id: I5d748cde04a70b9c158d09f9a0bd337ef809fd02
Reviewed-on: https://review.typo3.org/27188
Reviewed-by: Peter Kuehn
Tested-by: Peter Kuehn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
64 files changed:
typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Framework/ActionService.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Framework/DataSet.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/AbstractActionTestCase.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/changeParentContentRecordSorting.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/copyPageRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/copyParentContentRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/createParentContentRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/createParentContentRecordWithHotelAndOfferChildRecords.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/deletePageRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/deleteParentContentRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/localizeParentContentRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyOnlyHotelChildRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyPageRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentContentRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordAndAddHotelChildRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordAndChangeHotelChildRecordsSorting.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordAndDeleteHotelChildRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordWithHotelChildRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/moveParentContentRecordToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/moveParentContentRecordToDifferentPageAndChangeSorting.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Scenario/LiveDefaultElements.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Scenario/LiveDefaultPages.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/LiveActionTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/addCategoryRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/changeCategoryRelationSorting.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/copyCategoryRecordOfCategoryRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/copyContentRecordOfCategoryRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/deleteCategoryRecordOfCategoryRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/deleteCategoryRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/deleteContentRecordOfCategoryRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/localizeCategoryRecordOfCategoryRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/localizeContentRecordOfCategoryRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/modifyBothRecordsOfCategoryRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/modifyCategoryRecordOfCategoryRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/modifyContentRecordOfCategoryRelation.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/moveContentRecordOfCategoryRelationToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Scenario/LiveDefaultElements.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Scenario/LiveDefaultPages.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/LiveActionTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/changeContentRecordSorting.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/changePageRecordSorting.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/copyContentRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/copyPageRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/createContentRecords.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/createPageRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/deleteContentRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/deletePageRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/localizeContentRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/localizePageRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/modifyContentRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/modifyPageRecord.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/moveContentRecordToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/moveContentRecordToDifferentPageAndChangeSorting.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/movePageRecordToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/movePageRecordToDifferentPageAndChangeSorting.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Scenario/LiveDefaultElements.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Scenario/LiveDefaultPages.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/Regular/LiveActionTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/ExtTables/ext_tables.general.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Resources/Private/Language/locallang_db.xml
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/ext_tables.sql

diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php
new file mode 100644 (file)
index 0000000..7cc748b
--- /dev/null
@@ -0,0 +1,263 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Functional\DataHandling;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2014 Oliver Hader <oliver.hader@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!
+ ***************************************************************/
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Tests\Functional\DataHandling\Framework\DataSet;
+
+/**
+ * Functional test for the DataHandler
+ */
+abstract class AbstractDataHandlerActionTestCase extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
+
+       /**
+        * @var string
+        */
+       protected $dataSetDirectory;
+
+       /**
+        * @var array
+        */
+       protected $testExtensionsToLoad = array(
+               'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial',
+               // 'typo3conf/ext/datahandler',
+       );
+
+       /**
+        * @var \TYPO3\CMS\Core\Tests\Functional\DataHandling\Framework\ActionService
+        */
+       protected $actionService;
+
+       /**
+        * @var \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
+        */
+       protected $backendUser;
+
+       public function setUp() {
+               parent::setUp();
+
+               $this->backendUser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
+               $this->backendUser->user['admin'] = 1;
+               $this->backendUser->user['uid'] = 1;
+               // By default make tests on live workspace
+               $this->backendUser->workspace = 0;
+               $GLOBALS['BE_USER'] = $this->backendUser;
+
+               $this->actionService = $this->getActionService();
+
+               \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
+       }
+
+       public function tearDown() {
+               unset($this->actionService);
+       }
+
+       /**
+        * @return \TYPO3\CMS\Core\DataHandling\DataHandler
+        */
+       protected function getDataHandler() {
+               $dataHandler = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
+               return $dataHandler;
+       }
+
+       /**
+        * @return \TYPO3\CMS\Core\Tests\Functional\DataHandling\Framework\ActionService
+        */
+       protected function getActionService() {
+               return GeneralUtility::makeInstance(
+                       'TYPO3\\CMS\\Core\\Tests\\Functional\\DataHandling\\Framework\\ActionService',
+                       $this->getDataHandler()
+               );
+       }
+
+       /**
+        * @param string $dataSetName
+        */
+       protected function importScenarioDataSet($dataSetName) {
+               $fileName = rtrim($this->dataSetDirectory, '/') . '/Scenario/' . $dataSetName . '.csv';
+               $fileName = GeneralUtility::getFileAbsFileName($fileName);
+
+               $dataSet = DataSet::read($fileName);
+
+               foreach ($dataSet->getTableNames() as $tableName) {
+                       foreach ($dataSet->getElements($tableName) as $element) {
+                               $this->getDatabase()->exec_INSERTquery(
+                                       $tableName,
+                                       $element
+                               );
+                               $sqlError = $this->getDatabase()->sql_error();
+                               if (!empty($sqlError)) {
+                                       $this->fail('SQL Error for table "' . $tableName . '": ' . LF . $sqlError);
+                               }
+                       }
+               }
+       }
+
+       protected function assertAssertionDataSet($dataSetName) {
+               $fileName = rtrim($this->dataSetDirectory, '/') . '/Assertion/' . $dataSetName . '.csv';
+               $fileName = GeneralUtility::getFileAbsFileName($fileName);
+
+               $dataSet = DataSet::read($fileName);
+
+               foreach ($dataSet->getTableNames() as $tableName) {
+                       $hasUidField = ($dataSet->getIdIndex($tableName) !== NULL);
+                       $records = $this->getAllRecords($tableName, $hasUidField);
+                       foreach ($dataSet->getElements($tableName) as $assertion) {
+                               $result = $this->assertInRecords($assertion, $records);
+                               if ($result === FALSE) {
+                                       if ($hasUidField && empty($records[$assertion['uid']])) {
+                                               $this->fail('Record "' . $tableName . ':' . $assertion['uid'] . '" not found in database');
+                                       }
+                                       $recordIdentifier = $tableName . ($hasUidField ? ':' . $assertion['uid'] : '');
+                                       $additionalInformation = ($hasUidField ? $this->renderRecords($assertion, $records[$assertion['uid']]) : $this->arrayToString($assertion));
+                                       $this->fail('Assertion in data-set failed for "' . $recordIdentifier . '":' . LF . $additionalInformation);
+                               } else {
+                                       // Unset asserted record
+                                       unset($records[$result]);
+                                       // Increase assertion counter
+                                       $this->assertTrue($result !== FALSE);
+                               }
+                       }
+               }
+       }
+
+       /**
+        * @param array $assertion
+        * @param array $records
+        * @return bool|int|string
+        */
+       protected function assertInRecords(array $assertion, array $records) {
+               foreach ($records as $index => $record) {
+                       $differentFields = $this->getDifferentFields($assertion, $record);
+
+                       if (empty($differentFields)) {
+                               return $index;
+                       }
+               }
+
+               return FALSE;
+       }
+
+       /**
+        * @param string $tableName
+        * @param bool $hasUidField
+        * @return array
+        */
+       protected function getAllRecords($tableName, $hasUidField = FALSE) {
+               $allRecords = array();
+
+               $records = $this->getDatabase()->exec_SELECTgetRows(
+                       '*',
+                       $tableName,
+                       '1=1',
+                       '',
+                       '',
+                       '',
+                       ($hasUidField ? 'uid' : '')
+               );
+
+               if (!empty($records)) {
+                       $allRecords = $records;
+               }
+
+               return $allRecords;
+       }
+
+       /**
+        * @param array $array
+        * @return string
+        */
+       protected function arrayToString(array $array) {
+               $elements = array();
+               foreach ($array as $key => $value) {
+                       if (is_array($value)) {
+                               $value = $this->arrayToString($value);
+                       }
+                       $elements[] = "'" . $key . "' => '" . $value . "'";
+               }
+               return 'array(' . implode(', ', $elements) . ')';
+       }
+
+       /**
+        * @param array $assertion
+        * @param array $record
+        * @return string
+        */
+       protected function renderRecords(array $assertion, array $record) {
+               $differentFields = $this->getDifferentFields($assertion, $record);
+               $columns = array(
+                       'fields' => array('Fields'),
+                       'assertion' => array('Assertion'),
+                       'record' => array('Record'),
+               );
+               $lines = array();
+               $result = '';
+
+               foreach ($differentFields as $differentField) {
+                       $columns['fields'][] = $differentField;
+                       $columns['assertion'][] = ($assertion[$differentField] === NULL ? 'NULL' : $assertion[$differentField]);
+                       $columns['record'][] = ($record[$differentField] === NULL ? 'NULL' : $record[$differentField]);
+               }
+
+               foreach ($columns as $columnIndex => $column) {
+                       $columnLength = NULL;
+                       foreach ($column as $value) {
+                               $valueLength = strlen($value);
+                               if (empty($columnLength) || $valueLength > $columnLength) {
+                                       $columnLength = $valueLength;
+                               }
+                       }
+                       foreach ($column as $valueIndex => $value) {
+                               $lines[$valueIndex][$columnIndex] = str_pad($value, $columnLength, ' ');
+                       }
+               }
+
+               foreach ($lines as $line) {
+                       $result .= implode('|', $line) . PHP_EOL;
+               }
+
+               return $result;
+       }
+
+       /**
+        * @param array $assertion
+        * @param array $record
+        * @return array
+        */
+       protected function getDifferentFields(array $assertion, array $record) {
+               $differentFields = array();
+
+               foreach ($assertion as $field => $value) {
+                       if (strpos($value, '\\*') === 0) {
+                               continue;
+                       } elseif ((string)$record[$field] !== (string)$value) {
+                               $differentFields[] = $field;
+                       }
+               }
+
+               return $differentFields;
+       }
+
+}
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Framework/ActionService.php b/typo3/sysext/core/Tests/Functional/DataHandling/Framework/ActionService.php
new file mode 100644 (file)
index 0000000..071c65d
--- /dev/null
@@ -0,0 +1,316 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Functional\DataHandling\Framework;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2014 Oliver Hader <oliver.hader@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!
+ ***************************************************************/
+
+use TYPO3\CMS\Core\DataHandling\DataHandler;
+
+/**
+ * DataHandler Actions
+ */
+class ActionService {
+
+       /**
+        * @var DataHandler
+        */
+       protected $dataHandler;
+
+       /**
+        * @param DataHandler $dataHandler
+        */
+       public function __construct(DataHandler $dataHandler) {
+               $this->setDataHandler($dataHandler);
+       }
+
+       /**
+        * @param DataHandler $dataHandler
+        */
+       public function setDataHandler(DataHandler $dataHandler) {
+               $this->dataHandler = $dataHandler;
+       }
+
+       /**
+        * @return DataHandler
+        */
+       public function getDataHander() {
+               return $this->dataHandler;
+       }
+
+       /**
+        * @param string $tableName
+        * @param integer $pageId
+        * @param array $recordData
+        */
+       public function createNewRecord($tableName, $pageId, array $recordData) {
+               $this->createNewRecords($pageId, array($tableName => $recordData));
+       }
+
+       /**
+        * @param integer $pageId
+        * @param array $tableRecordData
+        */
+       public function createNewRecords($pageId, array $tableRecordData) {
+               $dataMap = array();
+               $currentUid = NULL;
+               foreach ($tableRecordData as $tableName => $recordData) {
+                       $recordData = $this->resolvePreviousUid($recordData, $currentUid);
+                       $recordData['pid'] = $pageId;
+                       $currentUid = uniqid('NEW');
+                       $dataMap[$tableName][$currentUid] = $recordData;
+               }
+               $this->dataHandler->start($dataMap, array());
+               $this->dataHandler->process_datamap();
+       }
+
+       /**
+        * @param string $tableName
+        * @param integer $uid
+        * @param array $recordData
+        * @param NULL|array $deleteTableRecordIds
+        */
+       public function modifyRecord($tableName, $uid, array $recordData, array $deleteTableRecordIds = NULL) {
+               $dataMap = array(
+                       $tableName => array(
+                               $uid => $recordData,
+                       ),
+               );
+               $commandMap = array();
+               if (!empty($deleteTableRecordIds)) {
+                       foreach ($deleteTableRecordIds as $tableName => $recordIds) {
+                               foreach ($recordIds as $recordId) {
+                                       $commandMap[$tableName][$recordId]['delete'] = TRUE;
+                               }
+                       }
+               }
+               $this->dataHandler->start($dataMap, $commandMap);
+               $this->dataHandler->process_datamap();
+               if (!empty($commandMap)) {
+                       $this->dataHandler->process_cmdmap();
+               }
+       }
+
+       /**
+        * @param integer $pageId
+        * @param array $tableRecordData
+        */
+       public function modifyRecords($pageId, array $tableRecordData) {
+               $dataMap = array();
+               $currentUid = NULL;
+               foreach ($tableRecordData as $tableName => $recordData) {
+                       if (empty($recordData['uid'])) {
+                               continue;
+                       }
+                       $recordData = $this->resolvePreviousUid($recordData, $currentUid);
+                       $currentUid = $recordData['uid'];
+                       if ($recordData['uid'] === '__NEW') {
+                               $recordData['pid'] = $pageId;
+                               $currentUid = uniqid('NEW');
+                       }
+                       unset($recordData['uid']);
+                       $dataMap[$tableName][$currentUid] = $recordData;
+               }
+               $this->dataHandler->start($dataMap, array());
+               $this->dataHandler->process_datamap();
+       }
+
+       /**
+        * @param string $tableName
+        * @param integer $uid
+        */
+       public function deleteRecord($tableName, $uid) {
+               $commandMap = array(
+                       $tableName => array(
+                               $uid => array(
+                                       'delete' => TRUE,
+                               ),
+                       ),
+               );
+               $this->dataHandler->start(array(), $commandMap);
+               $this->dataHandler->process_cmdmap();
+       }
+
+       /**
+        * @param string $tableName
+        * @param integer $uid
+        * @param integer $pageId
+        */
+       public function copyRecord($tableName, $uid, $pageId) {
+               $commandMap = array(
+                       $tableName => array(
+                               $uid => array(
+                                       'copy' => $pageId,
+                               ),
+                       ),
+               );
+               $this->dataHandler->start(array(), $commandMap);
+               $this->dataHandler->process_cmdmap();
+       }
+
+       /**
+        * @param string $tableName
+        * @param integer $uid
+        * @param integer $pageId
+        */
+       public function moveRecord($tableName, $uid, $pageId) {
+               $commandMap = array(
+                       $tableName => array(
+                               $uid => array(
+                                       'move' => $pageId,
+                               ),
+                       ),
+               );
+               $this->dataHandler->start(array(), $commandMap);
+               $this->dataHandler->process_cmdmap();
+       }
+
+       /**
+        * @param string $tableName
+        * @param integer $uid
+        * @param integer $languageId
+        */
+       public function localizeRecord($tableName, $uid, $languageId) {
+               $commandMap = array(
+                       $tableName => array(
+                               $uid => array(
+                                       'localize' => $languageId,
+                               ),
+                       ),
+               );
+               $this->dataHandler->start(array(), $commandMap);
+               $this->dataHandler->process_cmdmap();
+       }
+
+       /**
+        * @param string $tableName
+        * @param integer $uid
+        * @param string $fieldName
+        * @param array $referenceIds
+        */
+       public function modifyReferences($tableName, $uid, $fieldName, array $referenceIds) {
+               $dataMap = array(
+                       $tableName => array(
+                               $uid => array(
+                                       $fieldName => implode(',', $referenceIds),
+                               ),
+                       )
+               );
+               $this->dataHandler->start($dataMap, array());
+               $this->dataHandler->process_datamap();
+       }
+
+       /**
+        * @param string $tableName
+        * @param integer $uid
+        * @param string $fieldName
+        * @param integer $referenceId
+        */
+       public function addReference($tableName, $uid, $fieldName, $referenceId) {
+               $recordValues = $this->getRecordValues($tableName, $uid, $fieldName);
+
+               if (!in_array($referenceId, $recordValues)) {
+                       $recordValues[] = $referenceId;
+               }
+
+               $this->modifyReferences($tableName, $uid, $fieldName, $recordValues);
+       }
+
+       /**
+        * @param string $tableName
+        * @param integer $uid
+        * @param string $fieldName
+        * @param integer $referenceId
+        */
+       public function deleteReference($tableName, $uid, $fieldName, $referenceId) {
+               $recordValues = $this->getRecordValues($tableName, $uid, $fieldName);
+
+               if (($index = array_search($referenceId, $recordValues)) !== FALSE) {
+                       unset($recordValues[$index]);
+               }
+
+               $this->modifyReferences($tableName, $uid, $fieldName, $recordValues);
+       }
+
+       /**
+        * @param array $recordData
+        * @param NULL|int $previousUid
+        * @return array
+        */
+       protected function resolvePreviousUid(array $recordData, $previousUid) {
+               if ($previousUid === NULL) {
+                       return $recordData;
+               }
+               foreach ($recordData as $fieldName => $fieldValue) {
+                       if (strpos($fieldValue, '__previousUid') === FALSE) {
+                               continue;
+                       }
+                       $recordData[$fieldName] = str_replace('__previousUid', $previousUid, $fieldValue);
+               }
+               return $recordData;
+       }
+
+       /**
+        * @param string $tableName
+        * @param integer $uid
+        * @param string $fieldName
+        * @return array
+        */
+       protected function getRecordValues($tableName, $uid, $fieldName) {
+               $recordValues = array();
+
+               $recordValue = $this->getRecordValue($tableName, $uid, $fieldName);
+               if (!empty($recordValue)) {
+                       $recordValues = explode(',', $recordValues);
+               }
+
+               return $recordValues;
+       }
+
+       /**
+        * @param string $tableName
+        * @param integer $uid
+        * @param string $fieldName
+        * @return bool|string|NULL
+        */
+       protected function getRecordValue($tableName, $uid, $fieldName) {
+               $recordValue = FALSE;
+
+               $record = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
+                       $fieldName, $tableName, 'uid=' . (int)$uid
+               );
+
+               if (isset($record[$fieldName])) {
+                       $recordValue = $record[$fieldName];
+               }
+
+               return $recordValue;
+       }
+
+       /**
+        * @return \TYPO3\CMS\Core\Database\DatabaseConnection
+        */
+       protected function getDatabaseConnection() {
+               return $GLOBALS['TYPO3_DB'];
+       }
+
+}
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Framework/DataSet.php b/typo3/sysext/core/Tests/Functional/DataHandling/Framework/DataSet.php
new file mode 100644 (file)
index 0000000..ad52540
--- /dev/null
@@ -0,0 +1,212 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Functional\DataHandling\Framework;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2014 Oliver Hader <oliver.hader@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!
+ ***************************************************************/
+
+use \TYPO3\CMS\Core\Utility\GeneralUtility;
+
+/**
+ * DataHandler DataSet
+ */
+class DataSet {
+
+       /**
+        * @var array
+        */
+       protected $data;
+
+       /**
+        * @param string $fileName
+        * @return DataSet
+        */
+       public static function read($fileName) {
+               $data = self::parseData(self::readData($fileName));
+
+               return GeneralUtility::makeInstance(
+                       'TYPO3\\CMS\\Core\\Tests\\Functional\\DataHandling\\Framework\\DataSet',
+                       $data
+               );
+       }
+
+       /**
+        * @param string $fileName
+        * @return array
+        * @throws \RuntimeException
+        */
+       protected static function readData($fileName) {
+               if (!file_exists($fileName)) {
+                       throw new \RuntimeException('File "' . $fileName . '" does not exist');
+               }
+
+               $rawData = array();
+               $fileHandle = fopen($fileName, 'r');
+               while (($values = fgetcsv($fileHandle, 0)) !== FALSE) {
+                       $rawData[] = $values;
+               }
+               fclose($fileHandle);
+               return $rawData;
+       }
+
+       /**
+        * Parses CSV data.
+        *
+        * Special values are:
+        * + "\NULL" to treat as NULL value
+        * + "\*" to ignore value during comparison
+        *
+        * @param array $rawData
+        * @return array
+        */
+       protected static function parseData(array $rawData) {
+               $data = array();
+               $tableName = NULL;
+               $fieldCount = NULL;
+               $idIndex = NULL;
+               foreach ($rawData as $values) {
+                       if (!empty($values[0])) {
+                               $tableName = $values[0];
+                               $fieldCount = NULL;
+                               $idIndex = NULL;
+                               if (!isset($data[$tableName])) {
+                                       $data[$tableName] = array();
+                               }
+                       } elseif (implode('', $values) === '') {
+                               $tableName = NULL;
+                               $fieldCount = NULL;
+                               $idIndex = NULL;
+                       } elseif ($tableName !== NULL && !empty($values[1])) {
+                               array_shift($values);
+                               if (!isset($data[$tableName]['fields'])) {
+                                       $data[$tableName]['fields'] = array();
+                                       foreach ($values as $value) {
+                                               if (empty($value)) {
+                                                       continue;
+                                               }
+                                               $data[$tableName]['fields'][] = $value;
+                                               $fieldCount = count($data[$tableName]['fields']);
+                                       }
+                                       if (in_array('uid', $values)) {
+                                               $idIndex = array_search('uid', $values);
+                                               $data[$tableName]['idIndex'] = $idIndex;
+                                       }
+                               } else {
+                                       if (!isset($data[$tableName]['elements'])) {
+                                               $data[$tableName]['elements'] = array();
+                                       }
+                                       $values = array_slice($values, 0, $fieldCount);
+                                       foreach ($values as &$value) {
+                                               if ($value === '\\NULL') {
+                                                       $value = NULL;
+                                               }
+                                       }
+                                       unset($value);
+                                       $element = array_combine($data[$tableName]['fields'], $values);
+                                       if ($idIndex !== NULL) {
+                                               $data[$tableName]['elements'][$values[$idIndex]] = $element;
+                                       } else {
+                                               $data[$tableName]['elements'][] = $element;
+                                       }
+                               }
+                       }
+               }
+               return $data;
+       }
+
+       /**
+        * @param array $data
+        */
+       public function __construct(array $data) {
+               $this->data = $data;
+       }
+
+       /**
+        * @return array
+        */
+       public function getTableNames() {
+               return array_keys($this->data);
+       }
+
+       /**
+        * @param string $tableName
+        * @return NULL|array
+        */
+       public function getFields($tableName) {
+               $fields = NULL;
+               if (isset($this->data[$tableName]['fields'])) {
+                       $fields = $this->data[$tableName]['fields'];
+               }
+               return $fields;
+       }
+
+       /**
+        * @param string $tableName
+        * @return NULL|integer
+        */
+       public function getIdIndex($tableName) {
+               $idIndex = NULL;
+               if (isset($this->data[$tableName]['idIndex'])) {
+                       $idIndex = $this->data[$tableName]['idIndex'];
+               }
+               return $idIndex;
+       }
+
+       /**
+        * @param string $tableName
+        * @return NULL|array
+        */
+       public function getElements($tableName) {
+               $elements = NULL;
+               if (isset($this->data[$tableName]['elements'])) {
+                       $elements = $this->data[$tableName]['elements'];
+               }
+               return $elements;
+       }
+
+       /**
+        * @param string $fileName
+        */
+       public function persist($fileName) {
+               $fileHandle = fopen($fileName, 'w');
+
+               foreach ($this->data as $tableName => $tableData) {
+                       if (empty($tableData['fields']) || empty($tableData['elements'])) {
+                               continue;
+                       }
+
+                       $fields = $tableData['fields'];
+                       array_unshift($fields, '');
+
+                       fputcsv($fileHandle, array($tableName));
+                       fputcsv($fileHandle, $fields);
+
+                       foreach ($tableData['elements'] as $element) {
+                               array_unshift($element, '');
+                               fputcsv($fileHandle, $element);
+                       }
+               }
+
+               fclose($fileHandle);
+       }
+
+}
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/AbstractActionTestCase.php
new file mode 100644 (file)
index 0000000..968c737
--- /dev/null
@@ -0,0 +1,230 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Functional\DataHandling\InlineRelationalRecordEditing\ForeignField;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2014 Oliver Hader <oliver.hader@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(dirname(dirname(__FILE__))) . '/AbstractDataHandlerActionTestCase.php';
+
+/**
+ * Functional test for the DataHandler
+ */
+abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase {
+
+       const VALUE_PageId = 89;
+       const VALUE_PageIdTarget = 90;
+       const VALUE_PageIdWebsite = 1;
+       const VALUE_ContentIdFirst = 297;
+       const VALUE_ContentIdLast = 298;
+       const VALUE_LanguageId = 1;
+
+       const TABLE_Page = 'pages';
+       const TABLE_Content = 'tt_content';
+       const TABLE_Hotel = 'tx_irretutorial_1nff_hotel';
+       const TABLE_Offer = 'tx_irretutorial_1nff_offer';
+
+       /**
+        * @var string
+        */
+       protected $dataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/';
+
+       public function setUp() {
+               parent::setUp();
+               $this->importScenarioDataSet('LiveDefaultPages');
+               $this->importScenarioDataSet('LiveDefaultElements');
+       }
+
+       /**
+        * Parent content records
+        */
+
+       /**
+        * @test
+        */
+       public function createParentContentRecord() {
+               $this->actionService->createNewRecord(self::TABLE_Content, self::VALUE_PageId, array('header' => 'Testing #1'));
+               $this->assertAssertionDataSet('createParentContentRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function modifyParentContentRecord() {
+               $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, array('header' => 'Testing #1'));
+               $this->assertAssertionDataSet('modifyParentContentRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function deleteParentContentRecord() {
+               $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
+               $this->assertAssertionDataSet('deleteParentContentRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function copyParentContentRecord() {
+               $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageId);
+               $this->assertAssertionDataSet('copyParentContentRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function localizeParentContentRecord() {
+               $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->assertAssertionDataSet('localizeParentContentRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function changeParentContentRecordSorting() {
+               $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdLast);
+               $this->assertAssertionDataSet('changeParentContentRecordSorting');
+       }
+
+       /**
+        * @test
+        */
+       public function moveParentContentRecordToDifferentPage() {
+               $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
+               $this->assertAssertionDataSet('moveParentContentRecordToDifferentPage');
+       }
+
+       /**
+        * @test
+        */
+       public function moveParentContentRecordToDifferentPageAndChangeSorting() {
+               $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
+               $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdLast);
+               $this->assertAssertionDataSet('moveParentContentRecordToDifferentPageAndChangeSorting');
+       }
+
+       /**
+        * Page records
+        */
+
+       /**
+        * @test
+        */
+       public function modifyPageRecord() {
+               $this->actionService->modifyRecord(self::TABLE_Page, self::VALUE_PageId, array('title' => 'Testing #1'));
+               $this->assertAssertionDataSet('modifyPageRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function deletePageRecord() {
+               $this->actionService->deleteRecord(self::TABLE_Page, self::VALUE_PageId);
+               $this->assertAssertionDataSet('deletePageRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function copyPageRecord() {
+               $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
+               $this->assertAssertionDataSet('copyPageRecord');
+       }
+
+       /**
+        * IRRE Child Records
+        */
+
+       /**
+        * @test
+        */
+       public function createParentContentRecordWithHotelAndOfferChildRecords() {
+               $this->actionService->createNewRecords(
+                       self::VALUE_PageId,
+                       array(
+                               self::TABLE_Offer => array('title' => 'Offer #1'),
+                               self::TABLE_Hotel => array('title' => 'Hotel #1', 'offers' => '__previousUid'),
+                               self::TABLE_Content => array('header' => 'Testing #1', 'tx_irretutorial_hotels' => '__previousUid'),
+                       )
+               );
+               $this->assertAssertionDataSet('createParentContentRecordWithHotelAndOfferChildRecords');
+       }
+
+       /**
+        * @test
+        */
+       public function modifyOnlyHotelChildRecord() {
+               $this->actionService->modifyRecord(self::TABLE_Hotel, 4, array('title' => 'Testing #1'));
+               $this->assertAssertionDataSet('modifyOnlyHotelChildRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function modifyParentRecordAndChangeHotelChildRecordsSorting() {
+               $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, array('tx_irretutorial_hotels' => '4,3'));
+               $this->assertAssertionDataSet('modifyParentRecordAndChangeHotelChildRecordsSorting');
+       }
+
+       /**
+        * @test
+        */
+       public function modifyParentRecordWithHotelChildRecord() {
+               $this->actionService->modifyRecords(
+                       self::VALUE_PageId,
+                       array(
+                               self::TABLE_Hotel => array('uid' => 4, 'title' => 'Testing #1'),
+                               self::TABLE_Content => array('uid' => self::VALUE_ContentIdLast, 'tx_irretutorial_hotels' => '3,4'),
+                       )
+               );
+               $this->assertAssertionDataSet('modifyParentRecordWithHotelChildRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function modifyParentRecordAndAddHotelChildRecord() {
+               $this->actionService->modifyRecords(
+                       self::VALUE_PageId,
+                       array(
+                               self::TABLE_Hotel => array('uid' => '__NEW', 'title' => 'Hotel #2'),
+                               self::TABLE_Content => array('uid' => self::VALUE_ContentIdLast, 'tx_irretutorial_hotels' => '5,__previousUid'),
+                       )
+               );
+               $this->assertAssertionDataSet('modifyParentRecordAndAddHotelChildRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function modifyParentRecordAndDeleteHotelChildRecord() {
+               $this->actionService->modifyRecord(
+                       self::TABLE_Content,
+                       self::VALUE_ContentIdFirst,
+                       array('tx_irretutorial_hotels' => '3'),
+                       array(self::TABLE_Hotel => array(4))
+               );
+               $this->assertAssertionDataSet('modifyParentRecordAndDeleteHotelChildRecord');
+       }
+
+}
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/changeParentContentRecordSorting.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/changeParentContentRecordSorting.csv
new file mode 100644 (file)
index 0000000..2a70257
--- /dev/null
@@ -0,0 +1,24 @@
+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_hotels
+,297,89,768,0,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,89,256,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2
+,4,89,512,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1024,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
+,5,89,128,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,256,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2
+,7,89,512,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,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+tx_irretutorial_1nff_price
+,uid,pid,sorting,deleted,sys_language_uid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier
+,7,89,16,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,32,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer,
+,9,89,64,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,128,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer,
+,11,89,256,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,512,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/copyPageRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/copyPageRecord.csv
new file mode 100644 (file)
index 0000000..7031a0a
--- /dev/null
@@ -0,0 +1,47 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,89,88,256,0,0,0,0,0,0,Relations
+,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,categories,tx_irretutorial_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,1
+,299,91,256,0,0,0,0,0,0,0,0,"Regular Element #2",0,0,1
+,300,91,128,0,0,0,0,0,0,0,0,"Regular Element #1",0,0,2
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,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,"Hotel #1",297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+,6,91,1,0,0,0,0,0,0,0,"Hotel #1",299,tt_content,,1
+,7,91,1,0,0,0,0,0,0,0,"Hotel #1",300,tt_content,,2
+,8,91,2,0,0,0,0,0,0,0,"Hotel #2",300,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,91,1,0,0,0,0,0,0,0,"Offer #1.1",6,tx_irretutorial_1nff_hotel,,1
+,10,91,1,0,0,0,0,0,0,0,"Offer #1.1",7,tx_irretutorial_1nff_hotel,,3
+,11,91,2,0,0,0,0,0,0,0,"Offer #1.2",7,tx_irretutorial_1nff_hotel,,2
+,12,91,1,0,0,0,0,0,0,0,"Offer #2.1",8,tx_irretutorial_1nff_hotel,,1
+tx_irretutorial_1nff_price
+,uid,pid,sorting,deleted,sys_language_uid,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
+,14,91,1,0,0,0,0,0,0,0,"Price #1.1.1",9,tx_irretutorial_1nff_offer,
+,15,91,1,0,0,0,0,0,0,0,"Price #1.1.1",10,tx_irretutorial_1nff_offer,
+,16,91,2,0,0,0,0,0,0,0,"Price #1.1.2",10,tx_irretutorial_1nff_offer,
+,17,91,3,0,0,0,0,0,0,0,"Price #1.1.3",10,tx_irretutorial_1nff_offer,
+,18,91,1,0,0,0,0,0,0,0,"Price #1.2.1",11,tx_irretutorial_1nff_offer,
+,19,91,2,0,0,0,0,0,0,0,"Price #1.2.2",11,tx_irretutorial_1nff_offer,
+,20,91,1,0,0,0,0,0,0,0,"Price #2.1.1",12,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/copyParentContentRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/copyParentContentRecord.csv
new file mode 100644 (file)
index 0000000..6dbd88a
--- /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,image,categories,tx_irretutorial_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,1
+,299,89,128,0,0,0,0,0,0,0,0,"Regular Element #2 (copy 1)",0,0,1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,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,"Hotel #1",297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+,6,89,1,0,0,0,0,0,0,0,"Hotel #1",299,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,89,1,0,0,0,0,0,0,0,"Offer #1.1",6,tx_irretutorial_1nff_hotel,,1
+tx_irretutorial_1nff_price
+,uid,pid,sorting,deleted,sys_language_uid,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
+,14,89,1,0,0,0,0,0,0,0,"Price #1.1.1",9,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/createParentContentRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/createParentContentRecord.csv
new file mode 100644 (file)
index 0000000..156e6be
--- /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","image","categories","tx_irretutorial_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,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2","\NULL",0,1
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/createParentContentRecordWithHotelAndOfferChildRecords.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/createParentContentRecordWithHotelAndOfferChildRecords.csv
new file mode 100644 (file)
index 0000000..001cacf
--- /dev/null
@@ -0,0 +1,27 @@
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,1
+,299,89,128,0,0,0,0,0,0,0,0,"Testing #1",,0,1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,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,"Hotel #1",297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+,6,89,1,0,0,0,0,0,0,0,"Hotel #1",299,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,89,1,0,0,0,0,0,0,0,"Offer #1",6,tx_irretutorial_1nff_hotel,,0
+tx_irretutorial_1nff_price
+,uid,pid,sorting,deleted,sys_language_uid,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/deletePageRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/deletePageRecord.csv
new file mode 100644 (file)
index 0000000..d46f8bf
--- /dev/null
@@ -0,0 +1,30 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,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_hotels
+,297,89,1000000000,1,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,89,1000000000,1,0,0,0,0,0,0,0,"Regular Element #2",,0,1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,89,1000000000,1,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2
+,4,89,1000000000,1,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1000000000,1,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
+,5,89,1000000000,1,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,1000000000,1,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2
+,7,89,1000000000,1,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1000000000,1,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier
+,7,89,1000000000,1,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,1000000000,1,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer,
+,9,89,1000000000,1,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1000000000,1,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer,
+,11,89,1000000000,1,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1000000000,1,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer,
+,13,89,1000000000,1,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/deleteParentContentRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/deleteParentContentRecord.csv
new file mode 100644 (file)
index 0000000..4eac45e
--- /dev/null
@@ -0,0 +1,24 @@
+"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_hotels"
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","\NULL",0,2
+,298,89,1000000000,1,0,0,0,0,0,0,0,"Regular Element #2","\NULL",0,1
+"tx_irretutorial_1nff_hotel",,,,,,,,,,,,,,,
+,"uid","pid","sorting","deleted","sys_language_uid","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,"Hotel #1",297,"tt_content",,2
+,4,89,2,0,0,0,0,0,0,0,"Hotel #2",297,"tt_content",,1
+,5,89,1000000000,1,0,0,0,0,0,0,"Hotel #1",298,"tt_content",,1
+"tx_irretutorial_1nff_offer",,,,,,,,,,,,,,,
+,"uid","pid","sorting","deleted","sys_language_uid","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,"Offer #1.1",3,"tx_irretutorial_1nff_hotel",,3
+,6,89,2,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,"Offer #2.1",4,"tx_irretutorial_1nff_hotel",,1
+,8,89,1000000000,1,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","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,"Price #1.1.1",5,"tx_irretutorial_1nff_offer",
+,8,89,2,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,"Price #1.1.3",5,"tx_irretutorial_1nff_offer",
+,10,89,1,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,"Price #1.2.2",6,"tx_irretutorial_1nff_offer",
+,12,89,1,0,0,0,0,0,0,0,"Price #2.1.1",7,"tx_irretutorial_1nff_offer",
+,13,89,1000000000,1,0,0,0,0,0,0,"Price #1.1.1",8,"tx_irretutorial_1nff_offer",
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/localizeParentContentRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/localizeParentContentRecord.csv
new file mode 100644 (file)
index 0000000..8d0c818
--- /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,image,categories,tx_irretutorial_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,1
+,299,89,768,0,1,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2",0,0,1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,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,"Hotel #1",297,tt_content,,2
+,4,89,1280,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,768,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+,6,89,1,0,1,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,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,1536,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1024,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,89,1,0,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,1792,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,768,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1024,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
+,14,89,1,0,1,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/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyOnlyHotelChildRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyOnlyHotelChildRecord.csv
new file mode 100644 (file)
index 0000000..4df4b7c
--- /dev/null
@@ -0,0 +1,24 @@
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,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,"Hotel #1",297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,"Testing #1",297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyPageRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyPageRecord.csv
new file mode 100644 (file)
index 0000000..ed4fd56
--- /dev/null
@@ -0,0 +1,6 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,89,88,256,0,0,0,0,0,0,"Testing #1"
+,90,88,512,0,0,0,0,0,0,Target
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentContentRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentContentRecord.csv
new file mode 100644 (file)
index 0000000..0a29956
--- /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","image","categories","tx_irretutorial_hotels"
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","\NULL",0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Testing #1","\NULL",0,1
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordAndAddHotelChildRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordAndAddHotelChildRecord.csv
new file mode 100644 (file)
index 0000000..05db685
--- /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,image,categories,tx_irretutorial_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,2
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,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,"Hotel #1",297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+,6,89,2,0,0,0,0,0,0,0,"Hotel #2",298,tt_content,,0
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordAndChangeHotelChildRecordsSorting.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordAndChangeHotelChildRecordsSorting.csv
new file mode 100644 (file)
index 0000000..297a83e
--- /dev/null
@@ -0,0 +1,24 @@
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,89,2,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2
+,4,89,1,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordAndDeleteHotelChildRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordAndDeleteHotelChildRecord.csv
new file mode 100644 (file)
index 0000000..97f5a52
--- /dev/null
@@ -0,0 +1,24 @@
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,1
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,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,"Hotel #1",297,tt_content,,2
+,4,89,1000000000,1,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2
+,7,89,1000000000,1,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,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+tx_irretutorial_1nff_price
+,uid,pid,sorting,deleted,sys_language_uid,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1000000000,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordWithHotelChildRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/modifyParentRecordWithHotelChildRecord.csv
new file mode 100644 (file)
index 0000000..5c8e9da
--- /dev/null
@@ -0,0 +1,24 @@
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,0,2
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,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,"Hotel #1",298,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,"Testing #1",298,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,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,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/moveParentContentRecordToDifferentPage.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/moveParentContentRecordToDifferentPage.csv
new file mode 100644 (file)
index 0000000..312590a
--- /dev/null
@@ -0,0 +1,24 @@
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,90,256,0,0,0,0,0,0,0,0,"Regular Element #2",,0,1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,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,"Hotel #1",297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,90,256,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,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,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,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,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,90,256,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,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,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,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,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,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,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer,
+,13,90,256,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/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/moveParentContentRecordToDifferentPageAndChangeSorting.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Assertion/moveParentContentRecordToDifferentPageAndChangeSorting.csv
new file mode 100644 (file)
index 0000000..6ebb05a
--- /dev/null
@@ -0,0 +1,24 @@
+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_hotels
+,297,90,512,0,0,0,0,0,0,0,0,"Regular Element #1",,0,2
+,298,90,256,0,0,0,0,0,0,0,0,"Regular Element #2",,0,1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,90,64,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2
+,4,90,128,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,90,256,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
+,5,90,32,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,90,64,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2
+,7,90,128,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,90,256,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,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier
+,7,90,4,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,90,8,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer,
+,9,90,16,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,90,32,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer,
+,11,90,64,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,90,128,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer,
+,13,90,256,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/InlineRelationalRecordEditing/ForeignField/DataSet/Scenario/LiveDefaultElements.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Scenario/LiveDefaultElements.csv
new file mode 100644 (file)
index 0000000..5fc32df
--- /dev/null
@@ -0,0 +1,28 @@
+"sys_language",,,,,,,,,,,,,,,
+,"uid","pid","hidden","title","flag",,,,,,,,,,
+,1,0,0,"Dansk","dk",,,,,,,,,,
+,2,0,0,"Deutsch","de",,,,,,,,,,
+"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_hotels"
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","\NULL",0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2","\NULL",0,1
+"tx_irretutorial_1nff_hotel",,,,,,,,,,,,,,,
+,"uid","pid","sorting","deleted","sys_language_uid","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,"Hotel #1",297,"tt_content",,2
+,4,89,2,0,0,0,0,0,0,0,"Hotel #2",297,"tt_content",,1
+,5,89,1,0,0,0,0,0,0,0,"Hotel #1",298,"tt_content",,1
+"tx_irretutorial_1nff_offer",,,,,,,,,,,,,,,
+,"uid","pid","sorting","deleted","sys_language_uid","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,"Offer #1.1",3,"tx_irretutorial_1nff_hotel",,3
+,6,89,2,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,"Offer #2.1",4,"tx_irretutorial_1nff_hotel",,1
+,8,89,1,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","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,"Price #1.1.1",5,"tx_irretutorial_1nff_offer",,
+,8,89,2,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,"Price #1.1.3",5,"tx_irretutorial_1nff_offer",,
+,10,89,1,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,"Price #1.2.2",6,"tx_irretutorial_1nff_offer",,
+,12,89,1,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,"Price #1.1.1",8,"tx_irretutorial_1nff_offer",,
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Scenario/LiveDefaultPages.csv b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/DataSet/Scenario/LiveDefaultPages.csv
new file mode 100644 (file)
index 0000000..17b04d4
--- /dev/null
@@ -0,0 +1,6 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,89,88,256,0,0,0,0,0,0,Relations
+,90,88,512,0,0,0,0,0,0,Target
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/LiveActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/ForeignField/LiveActionTest.php
new file mode 100644 (file)
index 0000000..d942cc3
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Functional\DataHandling\InlineRelationalRecordEditing\ForeignField;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2014 Oliver Hader <oliver.hader@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__) . '/AbstractActionTestCase.php';
+
+/**
+ * Functional test for the DataHandler
+ */
+class LiveActionTest extends AbstractActionTestCase {
+
+       public function setUp() {
+               parent::setUp();
+               $this->backendUser->workspace = 0;
+       }
+
+}
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php
new file mode 100644 (file)
index 0000000..3295410
--- /dev/null
@@ -0,0 +1,172 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Functional\DataHandling\ManyToMany;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2014 Oliver Hader <oliver.hader@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(dirname(__FILE__)) . '/AbstractDataHandlerActionTestCase.php';
+
+/**
+ * Functional test for the DataHandler
+ */
+abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase {
+
+       const VALUE_PageId = 89;
+       const VALUE_PageIdTarget = 90;
+       const VALUE_ContentIdFirst = 297;
+       const VALUE_ContentIdLast = 298;
+       const VALUE_LanguageId = 1;
+       const VALUE_CategoryIdFirst = 28;
+       const VALUE_CategoryIdSecond = 29;
+
+       const TABLE_Content = 'tt_content';
+       const TABLE_Category = 'sys_category';
+       const TABLE_ContentCategory_ManyToMany = 'sys_category_record_mm';
+
+       /**
+        * @var string
+        */
+       protected $dataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/';
+
+       public function setUp() {
+               parent::setUp();
+               $this->importScenarioDataSet('LiveDefaultPages');
+               $this->importScenarioDataSet('LiveDefaultElements');
+       }
+
+       /**
+        * MM Relations
+        */
+
+       /**
+        * @test
+        */
+       public function addCategoryRelation() {
+               $this->actionService->modifyReferences(
+                       self::TABLE_Content, self::VALUE_ContentIdFirst, 'categories', array(self::VALUE_CategoryIdFirst, self::VALUE_CategoryIdSecond, 31)
+               );
+               $this->assertAssertionDataSet('addCategoryRelation');
+       }
+
+       /**
+        * @test
+        */
+       public function deleteCategoryRelation() {
+               $this->actionService->modifyReferences(
+                       self::TABLE_Content, self::VALUE_ContentIdFirst, 'categories', array(self::VALUE_CategoryIdFirst)
+               );
+               $this->assertAssertionDataSet('deleteCategoryRelation');
+       }
+
+       /**
+        * @test
+        */
+       public function changeCategoryRelationSorting() {
+               $this->actionService->modifyReferences(
+                       self::TABLE_Content, self::VALUE_ContentIdFirst, 'categories', array(self::VALUE_CategoryIdSecond, self::VALUE_CategoryIdFirst)
+               );
+               $this->assertAssertionDataSet('changeCategoryRelationSorting');
+       }
+
+       /**
+        * @test
+        */
+       public function modifyCategoryRecordOfCategoryRelation() {
+               $this->actionService->modifyRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst, array('title' => 'Testing #1'));
+               $this->assertAssertionDataSet('modifyCategoryRecordOfCategoryRelation');
+       }
+
+       /**
+        * @test
+        */
+       public function modifyContentRecordOfCategoryRelation() {
+               $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, array('header' => 'Testing #1'));
+               $this->assertAssertionDataSet('modifyContentRecordOfCategoryRelation');
+       }
+
+       /**
+        * @test
+        */
+       public function modifyBothRecordsOfCategoryRelation() {
+               $this->actionService->modifyRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst, array('title' => 'Testing #1'));
+               $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, array('header' => 'Testing #1'));
+               $this->assertAssertionDataSet('modifyBothRecordsOfCategoryRelation');
+       }
+
+       /**
+        * @test
+        */
+       public function deleteContentRecordOfCategoryRelation() {
+               $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
+               $this->assertAssertionDataSet('deleteContentRecordOfCategoryRelation');
+       }
+
+       /**
+        * @test
+        */
+       public function deleteCategoryRecordOfCategoryRelation() {
+               $this->actionService->deleteRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst);
+               $this->assertAssertionDataSet('deleteCategoryRecordOfCategoryRelation');
+       }
+
+       /**
+        * @test
+        */
+       public function copyContentRecordOfCategoryRelation() {
+               $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageId);
+               $this->assertAssertionDataSet('copyContentRecordOfCategoryRelation');
+       }
+
+       /**
+        * @test
+        */
+       public function copyCategoryRecordOfCategoryRelation() {
+               $this->actionService->copyRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst, 0);
+               $this->assertAssertionDataSet('copyCategoryRecordOfCategoryRelation');
+       }
+
+       /**
+        * @test
+        */
+       public function localizeContentRecordOfCategoryRelation() {
+               $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->assertAssertionDataSet('localizeContentRecordOfCategoryRelation');
+       }
+
+       /**
+        * @test
+        */
+       public function localizeCategoryRecordOfCategoryRelation() {
+               $this->actionService->localizeRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst, self::VALUE_LanguageId);
+               $this->assertAssertionDataSet('localizeCategoryRecordOfCategoryRelation');
+       }
+
+       /**
+        * @test
+        */
+       public function moveContentRecordOfCategoryRelationToDifferentPage() {
+               $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
+               $this->assertAssertionDataSet('moveContentRecordOfCategoryRelationToDifferentPage');
+       }
+
+}
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/addCategoryRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/addCategoryRelation.csv
new file mode 100644 (file)
index 0000000..1e25487
--- /dev/null
@@ -0,0 +1,7 @@
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+,31,297,tt_content,0,3,categories
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/changeCategoryRelationSorting.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/changeCategoryRelationSorting.csv
new file mode 100644 (file)
index 0000000..df2a85f
--- /dev/null
@@ -0,0 +1,6 @@
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,2,categories
+,29,297,tt_content,0,1,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/copyCategoryRecordOfCategoryRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/copyCategoryRecordOfCategoryRelation.csv
new file mode 100644 (file)
index 0000000..679c03d
--- /dev/null
@@ -0,0 +1,14 @@
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,"Category A",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+,32,0,128,0,0,0,0,0,0,0,0,"Category A",0,1
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+,32,297,tt_content,1,0,\*categories
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/copyContentRecordOfCategoryRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/copyContentRecordOfCategoryRelation.csv
new file mode 100644 (file)
index 0000000..8ae064f
--- /dev/null
@@ -0,0 +1,13 @@
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,2,0
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,2,0
+,299,89,128,0,0,0,0,0,0,0,0,"Regular Element #2 (copy 1)",0,2,0
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+,29,299,tt_content,0,1,categories
+,30,299,tt_content,0,2,categories
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/deleteCategoryRecordOfCategoryRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/deleteCategoryRecordOfCategoryRelation.csv
new file mode 100644 (file)
index 0000000..66770ad
--- /dev/null
@@ -0,0 +1,12 @@
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,1000000000,1,0,0,0,0,0,0,0,"Category A",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/deleteCategoryRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/deleteCategoryRelation.csv
new file mode 100644 (file)
index 0000000..478ded4
--- /dev/null
@@ -0,0 +1,5 @@
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/deleteContentRecordOfCategoryRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/deleteContentRecordOfCategoryRelation.csv
new file mode 100644 (file)
index 0000000..b40bf05
--- /dev/null
@@ -0,0 +1,10 @@
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,2,0
+,298,89,1000000000,1,0,0,0,0,0,0,0,"Regular Element #2",,2,0
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/localizeCategoryRecordOfCategoryRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/localizeCategoryRecordOfCategoryRelation.csv
new file mode 100644 (file)
index 0000000..0c7b266
--- /dev/null
@@ -0,0 +1,14 @@
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,"Category A",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+,32,0,384,0,1,28,0,0,0,0,0,"Category A",0,1
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+,32,297,tt_content,1,0,\*categories
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/localizeContentRecordOfCategoryRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/localizeContentRecordOfCategoryRelation.csv
new file mode 100644 (file)
index 0000000..4aa7bca
--- /dev/null
@@ -0,0 +1,13 @@
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,2,0
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,2,0
+,299,89,768,0,1,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2",0,2,0
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+,29,299,tt_content,0,1,categories
+,30,299,tt_content,0,2,categories
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/modifyBothRecordsOfCategoryRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/modifyBothRecordsOfCategoryRelation.csv
new file mode 100644 (file)
index 0000000..8583566
--- /dev/null
@@ -0,0 +1,16 @@
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,"Testing #1",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Testing #1",,2,0
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,2,0
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/modifyCategoryRecordOfCategoryRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/modifyCategoryRecordOfCategoryRelation.csv
new file mode 100644 (file)
index 0000000..d3323dc
--- /dev/null
@@ -0,0 +1,16 @@
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,"Testing #1",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,2,0
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,2,0
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/modifyContentRecordOfCategoryRelation.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/modifyContentRecordOfCategoryRelation.csv
new file mode 100644 (file)
index 0000000..70a85be
--- /dev/null
@@ -0,0 +1,16 @@
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,"Category A",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Testing #1",,2,0
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",,2,0
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/moveContentRecordOfCategoryRelationToDifferentPage.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Assertion/moveContentRecordOfCategoryRelationToDifferentPage.csv
new file mode 100644 (file)
index 0000000..4f44dd4
--- /dev/null
@@ -0,0 +1,10 @@
+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_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",,2,0
+,298,90,256,0,0,0,0,0,0,0,0,"Regular Element #2",,2,0
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Scenario/LiveDefaultElements.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Scenario/LiveDefaultElements.csv
new file mode 100644 (file)
index 0000000..faa0353
--- /dev/null
@@ -0,0 +1,20 @@
+"sys_language",,,,,,,,,,,,,,,
+,"uid","pid","hidden","title","flag",,,,,,,,,,
+,1,0,0,"Dansk","dk",,,,,,,,,,
+,2,0,0,"Deutsch","de",,,,,,,,,,
+"sys_category",,,,,,,,,,,,,,,
+,"uid","pid","sorting","deleted","sys_language_uid","l10n_parent","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","parent","items",
+,28,0,256,0,0,0,0,0,0,0,0,"Category A",0,0,
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0,
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0,
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0,
+"sys_category_record_mm",,,,,,,,,,,,,,,
+,"uid_local","uid_foreign","tablenames","sorting","sorting_foreign","fieldname",,,,,,,,,
+,28,297,"tt_content",0,1,"categories",,,,,,,,,
+,29,297,"tt_content",0,2,"categories",,,,,,,,,
+,29,298,"tt_content",0,1,"categories",,,,,,,,,
+,30,298,"tt_content",0,2,"categories",,,,,,,,,
+"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_hotels"
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","\NULL",2,0
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2","\NULL",2,0
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Scenario/LiveDefaultPages.csv b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/Scenario/LiveDefaultPages.csv
new file mode 100644 (file)
index 0000000..17b04d4
--- /dev/null
@@ -0,0 +1,6 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,89,88,256,0,0,0,0,0,0,Relations
+,90,88,512,0,0,0,0,0,0,Target
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/LiveActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/LiveActionTest.php
new file mode 100644 (file)
index 0000000..27f5b68
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Functional\DataHandling\ManyToMany;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2014 Oliver Hader <oliver.hader@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__) . '/AbstractActionTestCase.php';
+
+/**
+ * Functional test for the DataHandler
+ */
+class LiveActionTest extends AbstractActionTestCase {
+
+       public function setUp() {
+               parent::setUp();
+               $this->backendUser->workspace = 0;
+       }
+
+}
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php
new file mode 100644 (file)
index 0000000..0ae5e79
--- /dev/null
@@ -0,0 +1,196 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2014 Oliver Hader <oliver.hader@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(dirname(__FILE__)) . '/AbstractDataHandlerActionTestCase.php';
+
+/**
+ * Functional test for the DataHandler
+ */
+abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase {
+
+       const VALUE_PageId = 89;
+       const VALUE_PageIdTarget = 90;
+       const VALUE_PageIdWebsite = 1;
+       const VALUE_ContentIdFirst = 297;
+       const VALUE_ContentIdLast = 298;
+       const VALUE_LanguageId = 1;
+
+       const TABLE_Page = 'pages';
+       const TABLE_Content = 'tt_content';
+
+       /**
+        * @var string
+        */
+       protected $dataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/';
+
+       public function setUp() {
+               parent::setUp();
+               $this->importScenarioDataSet('LiveDefaultPages');
+               $this->importScenarioDataSet('LiveDefaultElements');
+       }
+
+       /**
+        * Content records
+        */
+
+       /**
+        * @test
+        */
+       public function createContentRecords() {
+               // Creating record at the beginning of the page
+               $this->actionService->createNewRecord(self::TABLE_Content, self::VALUE_PageId, array('header' => 'Testing #1'));
+               // Creating record at the end of the page (after last one)
+               $this->actionService->createNewRecord(self::TABLE_Content, -self::VALUE_ContentIdLast, array('header' => 'Testing #2'));
+               $this->assertAssertionDataSet('createContentRecords');
+       }
+
+       /**
+        * @test
+        */
+       public function modifyContentRecord() {
+               $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, array('header' => 'Testing #1'));
+               $this->assertAssertionDataSet('modifyContentRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function deleteContentRecord() {
+               $this->actionService->deleteRecord(self::TABLE_Content, self::VALUE_ContentIdLast);
+               $this->assertAssertionDataSet('deleteContentRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function copyContentRecord() {
+               $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageId);
+               $this->assertAssertionDataSet('copyContentRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function localizeContentRecord() {
+               $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId);
+               $this->assertAssertionDataSet('localizeContentRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function changeContentRecordSorting() {
+               $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdLast);
+               $this->assertAssertionDataSet('changeContentRecordSorting');
+       }
+
+       /**
+        * @test
+        */
+       public function moveContentRecordToDifferentPage() {
+               $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
+               $this->assertAssertionDataSet('moveContentRecordToDifferentPage');
+       }
+
+       /**
+        * @test
+        */
+       public function moveContentRecordToDifferentPageAndChangeSorting() {
+               $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
+               $this->actionService->moveRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, -self::VALUE_ContentIdLast);
+               $this->assertAssertionDataSet('moveContentRecordToDifferentPageAndChangeSorting');
+       }
+
+       /**
+        * Page records
+        */
+
+       /**
+        * @test
+        */
+       public function createPageRecord() {
+               $this->actionService->createNewRecord(self::TABLE_Page, self::VALUE_PageId, array('title' => 'Testing #1'));
+               $this->assertAssertionDataSet('createPageRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function modifyPageRecord() {
+               $this->actionService->modifyRecord(self::TABLE_Page, self::VALUE_PageId, array('title' => 'Testing #1'));
+               $this->assertAssertionDataSet('modifyPageRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function deletePageRecord() {
+               $this->actionService->deleteRecord(self::TABLE_Page, self::VALUE_PageId);
+               $this->assertAssertionDataSet('deletePageRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function copyPageRecord() {
+               $this->actionService->copyRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
+               $this->assertAssertionDataSet('copyPageRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function localizePageRecord() {
+               $this->actionService->localizeRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
+               $this->assertAssertionDataSet('localizePageRecord');
+       }
+
+       /**
+        * @test
+        */
+       public function changePageRecordSorting() {
+               $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, -self::VALUE_PageIdTarget);
+               $this->assertAssertionDataSet('changePageRecordSorting');
+       }
+
+       /**
+        * @test
+        */
+       public function movePageRecordToDifferentPage() {
+               $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, self::VALUE_PageIdTarget);
+               $this->assertAssertionDataSet('movePageRecordToDifferentPage');
+       }
+
+       /**
+        * @test
+        */
+       public function movePageRecordToDifferentPageAndChangeSorting() {
+               $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageIdTarget, self::VALUE_PageIdWebsite);
+               $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageId, -self::VALUE_PageIdTarget);
+               $this->assertAssertionDataSet('movePageRecordToDifferentPageAndChangeSorting');
+       }
+
+}
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/changeContentRecordSorting.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/changeContentRecordSorting.csv
new file mode 100644 (file)
index 0000000..eb85e1e
--- /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,image,categories,tx_irretutorial_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/changePageRecordSorting.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/changePageRecordSorting.csv
new file mode 100644 (file)
index 0000000..2e0b236
--- /dev/null
@@ -0,0 +1,6 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,89,88,768,0,0,0,0,0,0,Relations
+,90,88,512,0,0,0,0,0,0,Target
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/copyContentRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/copyContentRecord.csv
new file mode 100644 (file)
index 0000000..23a5a68
--- /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,image,categories,tx_irretutorial_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/copyPageRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/copyPageRecord.csv
new file mode 100644 (file)
index 0000000..f61da22
--- /dev/null
@@ -0,0 +1,13 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,89,88,256,0,0,0,0,0,0,Relations
+,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_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/createContentRecords.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/createContentRecords.csv
new file mode 100644 (file)
index 0000000..3e07929
--- /dev/null
@@ -0,0 +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_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/createPageRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/createPageRecord.csv
new file mode 100644 (file)
index 0000000..3d981dd
--- /dev/null
@@ -0,0 +1,7 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,89,88,256,0,0,0,0,0,0,Relations
+,90,88,512,0,0,0,0,0,0,Target
+,91,89,256,0,0,0,0,0,0,"Testing #1"
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/deleteContentRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/deleteContentRecord.csv
new file mode 100644 (file)
index 0000000..17212cf
--- /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","image","categories","tx_irretutorial_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/deletePageRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/deletePageRecord.csv
new file mode 100644 (file)
index 0000000..be2c7df
--- /dev/null
@@ -0,0 +1,10 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,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_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/localizeContentRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/localizeContentRecord.csv
new file mode 100644 (file)
index 0000000..ae8fbd1
--- /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,image,categories,tx_irretutorial_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/localizePageRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/localizePageRecord.csv
new file mode 100644 (file)
index 0000000..8c8d9a6
--- /dev/null
@@ -0,0 +1,13 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,89,88,256,0,0,0,0,0,0,Relations
+,90,88,512,0,0,0,0,0,0,Target
+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_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/modifyContentRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/modifyContentRecord.csv
new file mode 100644 (file)
index 0000000..8b02b73
--- /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","image","categories","tx_irretutorial_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/modifyPageRecord.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/modifyPageRecord.csv
new file mode 100644 (file)
index 0000000..ed4fd56
--- /dev/null
@@ -0,0 +1,6 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,89,88,256,0,0,0,0,0,0,"Testing #1"
+,90,88,512,0,0,0,0,0,0,Target
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/moveContentRecordToDifferentPage.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/moveContentRecordToDifferentPage.csv
new file mode 100644 (file)
index 0000000..3d384a4
--- /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,image,categories,tx_irretutorial_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/moveContentRecordToDifferentPageAndChangeSorting.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/moveContentRecordToDifferentPageAndChangeSorting.csv
new file mode 100644 (file)
index 0000000..8b7acce
--- /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,image,categories,tx_irretutorial_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/movePageRecordToDifferentPage.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/movePageRecordToDifferentPage.csv
new file mode 100644 (file)
index 0000000..531b93e
--- /dev/null
@@ -0,0 +1,10 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,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_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/movePageRecordToDifferentPageAndChangeSorting.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Assertion/movePageRecordToDifferentPageAndChangeSorting.csv
new file mode 100644 (file)
index 0000000..915ba38
--- /dev/null
@@ -0,0 +1,10 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,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_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
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Scenario/LiveDefaultElements.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Scenario/LiveDefaultElements.csv
new file mode 100644 (file)
index 0000000..380aec1
--- /dev/null
@@ -0,0 +1,14 @@
+"sys_language",,,,,,,,,,,,,,,
+,"uid","pid","hidden","title","flag",,,,,,,,,,
+,1,0,0,"Dansk","dk",,,,,,,,,,
+,2,0,0,"Deutsch","de",,,,,,,,,,
+"sys_category",,,,,,,,,,,,,,,
+,"uid","pid","sorting","deleted","sys_language_uid","l10n_parent","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","parent","items",
+,28,0,256,0,0,0,0,0,0,0,0,"Category A",0,0,
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0,
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0,
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0,
+"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_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,"Regular Element #2","\NULL",0,0
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Scenario/LiveDefaultPages.csv b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/Scenario/LiveDefaultPages.csv
new file mode 100644 (file)
index 0000000..17b04d4
--- /dev/null
@@ -0,0 +1,6 @@
+pages
+,uid,pid,sorting,deleted,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,1,0,256,0,0,0,0,0,0,FunctionalTest
+,88,1,256,0,0,0,0,0,0,DataHandlerTest
+,89,88,256,0,0,0,0,0,0,Relations
+,90,88,512,0,0,0,0,0,0,Target
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/LiveActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/LiveActionTest.php
new file mode 100644 (file)
index 0000000..4e989cc
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2014 Oliver Hader <oliver.hader@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__) . '/AbstractActionTestCase.php';
+
+/**
+ * Functional test for the DataHandler
+ */
+class LiveActionTest extends AbstractActionTestCase {
+
+       public function setUp() {
+               parent::setUp();
+               $this->backendUser->workspace = 0;
+       }
+
+}
index bbc5bb2..af9fb41 100644 (file)
@@ -67,6 +67,27 @@ if (!defined('TYPO3_MODE')) {
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
        'tt_content',
         array(
+                'tx_irretutorial_hotels' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:irre_tutorial/Resources/Private/Language/locallang_db.xml:tt_content.tx_irretutorial_hotels',
+                       'config' => array(
+                               'type' => 'inline',
+                               'foreign_table' => 'tx_irretutorial_1nff_hotel',
+                               'foreign_field' => 'parentid',
+                               'foreign_table_field' => 'parenttable',
+                               'maxitems' => 10,
+                               'appearance' => array(
+                                       'showSynchronizationLink' => 1,
+                                       'showAllLocalizationLink' => 1,
+                                       'showPossibleLocalizationRecords' => 1,
+                                       'showRemovedLocalizationRecords' => 1,
+                               ),
+                               'behaviour' => array(
+                                       'localizationMode' => 'select',
+                                       'localizeChildrenAtParentLocalization' => TRUE,
+                               ),
+                       )
+               ),
                'tx_irretutorial_flexform' => array(
                        'exclude' => 1,
                        'label' => 'LLL:EXT:irre_tutorial/Resources/Private/Language/locallang_db.xml:tt_content.tx_irretutorial_flexform',
@@ -82,6 +103,6 @@ if (!defined('TYPO3_MODE')) {
 
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
        'tt_content',
-       '--div--;LLL:EXT:irre_tutorial/Resources/Private/Language/locallang_db.xml:tt_content.div.irre, tx_irretutorial_flexform;;;;1-1-1'
+       '--div--;LLL:EXT:irre_tutorial/Resources/Private/Language/locallang_db.xml:tt_content.div.irre, tx_irretutorial_hotels;;;;1-1-1, tx_irretutorial_flexform'
 );
 ?>
\ No newline at end of file
index f5cf6a3..392625d 100644 (file)
@@ -12,6 +12,7 @@
                        <label index="pages.doktype.div.irre">IRRE Tutorial</label>
                        <label index="pages.doktype.I.233">IRRE Tutorial Test Page</label>
                        <label index="pages.tx_irretutorial_hotels">Hotels:</label>
+                       <label index="tt_content.tx_irretutorial_hotels">Hotels:</label>
                        <label index="tt_content.tx_irretutorial_flexform">IRRE:</label>
                        <label index="tt_content.tx_irretutorial_flexform.hotels">IRRE:</label>
                        <label index="tt_content.div.irre">IRRE Tutorial</label>
index 98dfc90..c3261a9 100644 (file)
@@ -22,6 +22,7 @@ CREATE TABLE pages_language_overlay (
 # Table structure for table 'tt_content'
 #
 CREATE TABLE tt_content (
+    tx_irretutorial_hotels int(11) DEFAULT '0' NOT NULL,
     tx_irretutorial_flexform mediumtext
 );