[TASK] Extend DataHandler IRRE functional tests 76/30176/3
authorOliver Hader <oliver@typo3.org>
Fri, 16 May 2014 11:40:33 +0000 (13:40 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 16 May 2014 19:24:51 +0000 (21:24 +0200)
Extend CSV and ForeignField test with
* copyParentContentToDifferentPage
* modifyHotelChild

Resolves: #58854
Releases: 6.2
Change-Id: Iba332ccee1728bf1e28ff5719029b6ab73a30c53
Reviewed-on: https://review.typo3.org/30176
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
20 files changed:
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/copyParentContentToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/copyParentContentToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyParentContentToDifferentPage.csv [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyParentContentToDifferentPage.csv [new file with mode: 0644]

index fe5527c..f4a16cd 100644 (file)
@@ -36,6 +36,9 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        const VALUE_PageIdWebsite = 1;
        const VALUE_ContentIdFirst = 297;
        const VALUE_ContentIdLast = 298;
+       const VALUE_HotelIdFirst = 3;
+       const VALUE_HotelIdSecond = 4;
+       const VALUE_HotelIdThird = 5;
        const VALUE_LanguageId = 1;
 
        const TABLE_Page = 'pages';
@@ -98,6 +101,14 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               $newTableIds = $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
+               $this->recordIds['newContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
         * @test
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
index 7455834..458af32 100644 (file)
@@ -97,6 +97,21 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\
 
        /**
         * @test
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               parent::copyParentContentToDifferentPage();
+               $this->assertAssertionDataSet('copyParentContentToDifferentPage');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageIdTarget)->getResponseContent();
+               $this->assertResponseContentStructureHasRecords(
+                       $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('Hotel #1')
+               );
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
        public function localizeParentContent() {
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToDifferentPage.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToDifferentPage.csv
new file mode 100644 (file)
index 0000000..74d5d3c
--- /dev/null
@@ -0,0 +1,34 @@
+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
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,90,256,0,0,0,0,0,0,0,0,"Regular Element #2",6
+tx_irretutorial_1ncsv_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+,6,90,64,0,0,0,0,0,0,0,0,"Hotel #1",9
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,0,0,0,0,0,0,0,0,"Offer #1.1","7,8,9"
+,6,89,128,0,0,0,0,0,0,0,0,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
+,9,90,32,0,0,0,0,0,0,0,0,"Offer #1.1",14
+tx_irretutorial_1ncsv_price
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,14,90,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
index dd61b64..04862da 100644 (file)
@@ -36,6 +36,9 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        const VALUE_PageIdWebsite = 1;
        const VALUE_ContentIdFirst = 297;
        const VALUE_ContentIdLast = 298;
+       const VALUE_HotelIdFirst = 3;
+       const VALUE_HotelIdSecond = 4;
+       const VALUE_HotelIdThird = 5;
        const VALUE_LanguageId = 1;
 
        const TABLE_Page = 'pages';
@@ -98,6 +101,14 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               $newTableIds = $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
+               $this->recordIds['newContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
         * @test
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
index ada6480..f55a604 100644 (file)
@@ -97,6 +97,21 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\Fore
 
        /**
         * @test
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               parent::copyParentContentToDifferentPage();
+               $this->assertAssertionDataSet('copyParentContentToDifferentPage');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageIdTarget)->getResponseContent();
+               $this->assertResponseContentStructureHasRecords(
+                       $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('Hotel #1')
+               );
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
        public function localizeParentContent() {
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToDifferentPage.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToDifferentPage.csv
new file mode 100644 (file)
index 0000000..90a8891
--- /dev/null
@@ -0,0 +1,34 @@
+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
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,90,256,0,0,0,0,0,0,0,0,"Regular Element #2",1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,89,1,0,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+,6,90,1,0,0,0,0,0,0,0,0,"Hotel #1",299,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
+,5,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,0,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2
+,7,89,1,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,90,1,0,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,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier
+,7,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,0,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer,
+,9,89,3,0,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,0,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer,
+,11,89,2,0,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,0,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer,
+,13,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
+,14,90,1,0,0,0,0,0,0,0,0,"Price #1.1.1",9,tx_irretutorial_1nff_offer,
index 86d0ef4..405888f 100644 (file)
@@ -36,6 +36,9 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        const VALUE_PageIdWebsite = 1;
        const VALUE_ContentIdFirst = 297;
        const VALUE_ContentIdLast = 298;
+       const VALUE_HotelIdFirst = 3;
+       const VALUE_HotelIdSecond = 4;
+       const VALUE_HotelIdThird = 5;
        const VALUE_LanguageId = 1;
        const VALUE_WorkspaceId = 1;
 
@@ -115,6 +118,14 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               $newTableIds = $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
+               $this->recordIds['newContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
        public function localizeParentContent() {
index b40f5d6..7a1448f 100644 (file)
@@ -109,6 +109,21 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               parent::copyParentContentToDifferentPage();
+               $this->assertAssertionDataSet('copyParentContentToDifferentPage');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
+               $this->assertResponseContentStructureHasRecords(
+                       $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('Hotel #1')
+               );
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
        public function localizeParentContent() {
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToDifferentPage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToDifferentPage.csv
new file mode 100644 (file)
index 0000000..fcff55f
--- /dev/null
@@ -0,0 +1,38 @@
+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
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,90,256,0,0,0,1,1,0,0,0,"Regular Element #2",6
+,300,-1,256,0,0,0,1,-1,0,299,0,"Regular Element #2",6
+tx_irretutorial_1ncsv_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+,6,90,256,0,0,0,1,1,0,0,0,"Hotel #1",9
+,7,-1,256,0,0,0,1,-1,0,6,0,"Hotel #1",9
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,0,0,0,0,0,0,0,0,"Offer #1.1","7,8,9"
+,6,89,128,0,0,0,0,0,0,0,0,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
+,9,90,256,0,0,0,1,1,0,0,0,"Offer #1.1",14
+,10,-1,256,0,0,0,1,-1,0,9,0,"Offer #1.1",14
+tx_irretutorial_1ncsv_price
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,14,90,256,0,0,0,1,1,0,0,0,"Price #1.1.1"
+,15,-1,256,0,0,0,1,-1,0,14,0,"Price #1.1.1"
index 8a32c3c..ddcc577 100644 (file)
@@ -119,6 +119,22 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               parent::copyParentContentToDifferentPage();
+               $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
+               $this->assertAssertionDataSet('copyParentContentToDifferentPage');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseContent();
+               $this->assertResponseContentStructureHasRecords(
+                       $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('Hotel #1')
+               );
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
        public function localizeParentContent() {
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/copyParentContentToDifferentPage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/copyParentContentToDifferentPage.csv
new file mode 100644 (file)
index 0000000..a335203
--- /dev/null
@@ -0,0 +1,34 @@
+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
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,90,256,0,0,0,0,0,0,0,0,"Regular Element #2",6
+tx_irretutorial_1ncsv_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+,6,90,256,0,0,0,0,0,0,0,0,"Hotel #1",9
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,0,0,0,0,0,0,0,0,"Offer #1.1","7,8,9"
+,6,89,128,0,0,0,0,0,0,0,0,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
+,9,90,256,0,0,0,0,0,0,0,0,"Offer #1.1",14
+tx_irretutorial_1ncsv_price
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,14,90,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
index 8fe3a42..38119c4 100644 (file)
@@ -118,6 +118,22 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               parent::copyParentContentToDifferentPage();
+               $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+               $this->assertAssertionDataSet('copyParentContentToDifferentPage');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseContent();
+               $this->assertResponseContentStructureHasRecords(
+                       $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('Hotel #1')
+               );
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
        public function localizeParentContent() {
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/copyParentContentToDifferentPage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/copyParentContentToDifferentPage.csv
new file mode 100644 (file)
index 0000000..a335203
--- /dev/null
@@ -0,0 +1,34 @@
+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
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","3,4"
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5
+,299,90,256,0,0,0,0,0,0,0,0,"Regular Element #2",6
+tx_irretutorial_1ncsv_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers
+,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6"
+,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7
+,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8
+,6,90,256,0,0,0,0,0,0,0,0,"Hotel #1",9
+tx_irretutorial_1ncsv_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices
+,5,89,256,0,0,0,0,0,0,0,0,"Offer #1.1","7,8,9"
+,6,89,128,0,0,0,0,0,0,0,0,"Offer #1.2","10,11"
+,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12
+,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13
+,9,90,256,0,0,0,0,0,0,0,0,"Offer #1.1",14
+tx_irretutorial_1ncsv_price
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title
+,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2"
+,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3"
+,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1"
+,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2"
+,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1"
+,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1"
+,14,90,256,0,0,0,0,0,0,0,0,"Price #1.1.1"
index 306d7a3..74ac9ee 100644 (file)
@@ -36,6 +36,9 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        const VALUE_PageIdWebsite = 1;
        const VALUE_ContentIdFirst = 297;
        const VALUE_ContentIdLast = 298;
+       const VALUE_HotelIdFirst = 3;
+       const VALUE_HotelIdSecond = 4;
+       const VALUE_HotelIdThird = 5;
        const VALUE_LanguageId = 1;
        const VALUE_WorkspaceId = 1;
 
@@ -115,6 +118,14 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        }
 
        /**
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               $newTableIds = $this->actionService->copyRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_PageIdTarget);
+               $this->recordIds['newContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast];
+       }
+
+       /**
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
        public function localizeParentContent() {
index 8fed7e6..1a09644 100644 (file)
@@ -109,6 +109,21 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               parent::copyParentContentToDifferentPage();
+               $this->assertAssertionDataSet('copyParentContentToDifferentPage');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseContent();
+               $this->assertResponseContentStructureHasRecords(
+                       $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('Hotel #1')
+               );
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
        public function localizeParentContent() {
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToDifferentPage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToDifferentPage.csv
new file mode 100644 (file)
index 0000000..df1f521
--- /dev/null
@@ -0,0 +1,38 @@
+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
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,90,256,0,0,0,1,1,0,0,0,"Regular Element #2",0
+,300,-1,256,0,0,0,1,-1,0,299,0,"Regular Element #2",1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,89,1,0,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+,6,90,1,0,0,0,1,1,0,0,0,"Hotel #1",299,tt_content,,0
+,7,-1,256,0,0,0,1,-1,0,6,0,"Hotel #1",299,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
+,5,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,0,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2
+,7,89,1,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,90,1,0,0,0,1,1,0,0,0,"Offer #1.1",6,tx_irretutorial_1nff_hotel,,0
+,10,-1,256,0,0,0,1,-1,0,9,0,"Offer #1.1",6,tx_irretutorial_1nff_hotel,,1
+tx_irretutorial_1nff_price
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier
+,7,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,0,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer,
+,9,89,3,0,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,0,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer,
+,11,89,2,0,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,0,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer,
+,13,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
+,14,90,1,0,0,0,1,1,0,0,0,"Price #1.1.1",9,tx_irretutorial_1nff_offer,
+,15,-1,256,0,0,0,1,-1,0,14,0,"Price #1.1.1",9,tx_irretutorial_1nff_offer,
index 6ae349c..763ebe6 100644 (file)
@@ -115,6 +115,22 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               parent::copyParentContentToDifferentPage();
+               $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
+               $this->assertAssertionDataSet('copyParentContentToDifferentPage');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseContent();
+               $this->assertResponseContentStructureHasRecords(
+                       $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('Hotel #1')
+               );
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
        public function localizeParentContent() {
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyParentContentToDifferentPage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyParentContentToDifferentPage.csv
new file mode 100644 (file)
index 0000000..90a8891
--- /dev/null
@@ -0,0 +1,34 @@
+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
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,90,256,0,0,0,0,0,0,0,0,"Regular Element #2",1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,89,1,0,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+,6,90,1,0,0,0,0,0,0,0,0,"Hotel #1",299,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
+,5,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,0,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2
+,7,89,1,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,90,1,0,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,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier
+,7,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,0,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer,
+,9,89,3,0,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,0,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer,
+,11,89,2,0,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,0,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer,
+,13,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
+,14,90,1,0,0,0,0,0,0,0,0,"Price #1.1.1",9,tx_irretutorial_1nff_offer,
index b1c7d89..1298a99 100644 (file)
@@ -114,6 +114,22 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR
 
        /**
         * @test
+        * @see DataSet/copyParentContentToDifferentPage.csv
+        */
+       public function copyParentContentToDifferentPage() {
+               parent::copyParentContentToDifferentPage();
+               $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+               $this->assertAssertionDataSet('copyParentContentToDifferentPage');
+
+               $responseContent = $this->getFrontendResponse(self::VALUE_PageIdTarget, 0)->getResponseContent();
+               $this->assertResponseContentStructureHasRecords(
+                       $responseContent, self::TABLE_Content . ':' . $this->recordIds['newContentId'], self::FIELD_ContentHotel,
+                       self::TABLE_Hotel, 'title', array('Hotel #1')
+               );
+       }
+
+       /**
+        * @test
         * @see DataSet/Assertion/localizeParentContentRecord.csv
         */
        public function localizeParentContent() {
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyParentContentToDifferentPage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyParentContentToDifferentPage.csv
new file mode 100644 (file)
index 0000000..90a8891
--- /dev/null
@@ -0,0 +1,34 @@
+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
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1
+,299,90,256,0,0,0,0,0,0,0,0,"Regular Element #2",1
+tx_irretutorial_1nff_hotel
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers
+,3,89,1,0,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2
+,4,89,2,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
+,5,89,1,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
+,6,90,1,0,0,0,0,0,0,0,0,"Hotel #1",299,tt_content,,1
+tx_irretutorial_1nff_offer
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
+,5,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
+,6,89,2,0,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2
+,7,89,1,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
+,8,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
+,9,90,1,0,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,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier
+,7,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
+,8,89,2,0,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer,
+,9,89,3,0,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer,
+,10,89,1,0,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer,
+,11,89,2,0,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer,
+,12,89,1,0,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer,
+,13,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
+,14,90,1,0,0,0,0,0,0,0,0,"Price #1.1.1",9,tx_irretutorial_1nff_offer,