diff --git a/Tests/Functional/Updates/AccordionContentElementUpdateTest.php b/Tests/Functional/Updates/AccordionContentElementUpdateTest.php new file mode 100644 index 000000000..fd2842e7e --- /dev/null +++ b/Tests/Functional/Updates/AccordionContentElementUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new AccordionContentElementUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/AccordionContentElementUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/AccordionContentElementUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/AccordionContentElementUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/AccordionMediaOrientUpdateTest.php b/Tests/Functional/Updates/AccordionMediaOrientUpdateTest.php new file mode 100644 index 000000000..d3a94fe74 --- /dev/null +++ b/Tests/Functional/Updates/AccordionMediaOrientUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new AccordionMediaOrientUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/AccordionMediaOrientUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/AccordionMediaOrientUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/AccordionMediaOrientUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/BackendLayoutUpdateTest.php b/Tests/Functional/Updates/BackendLayoutUpdateTest.php new file mode 100644 index 000000000..aadb9aeda --- /dev/null +++ b/Tests/Functional/Updates/BackendLayoutUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new BackendLayoutUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/BackendLayoutUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/BackendLayoutUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/BackendLayoutUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/BulletContentElementUpdateTest.php b/Tests/Functional/Updates/BulletContentElementUpdateTest.php new file mode 100644 index 000000000..d45d0d0c3 --- /dev/null +++ b/Tests/Functional/Updates/BulletContentElementUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new BulletContentElementUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/BulletContentElementUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/BulletContentElementUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/BulletContentElementUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/CarouselContentElementUpdateTest.php b/Tests/Functional/Updates/CarouselContentElementUpdateTest.php new file mode 100644 index 000000000..e16e122e5 --- /dev/null +++ b/Tests/Functional/Updates/CarouselContentElementUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new CarouselContentElementUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/CarouselContentElementUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/CarouselContentElementUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/CarouselContentElementUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/CarouselItemLayoutUpdateTest.php b/Tests/Functional/Updates/CarouselItemLayoutUpdateTest.php new file mode 100644 index 000000000..8f0c22492 --- /dev/null +++ b/Tests/Functional/Updates/CarouselItemLayoutUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new CarouselItemLayoutUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/CarouselItemLayoutUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/CarouselItemLayoutUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/CarouselItemLayoutUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/CarouselItemTypeUpdateTest.php b/Tests/Functional/Updates/CarouselItemTypeUpdateTest.php new file mode 100644 index 000000000..acbe01e17 --- /dev/null +++ b/Tests/Functional/Updates/CarouselItemTypeUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new CarouselItemTypeUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/CarouselItemTypeUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/CarouselItemTypeUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/CarouselItemTypeUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/ExternalMediaContentElementUpdateTest.php b/Tests/Functional/Updates/ExternalMediaContentElementUpdateTest.php new file mode 100644 index 000000000..630138312 --- /dev/null +++ b/Tests/Functional/Updates/ExternalMediaContentElementUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new ExternalMediaContentElementUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/ExternalMediaContentElementUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/ExternalMediaContentElementUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/ExternalMediaContentElementUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/Fixtures/AccordionContentElementUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/AccordionContentElementUpdate/Input.csv new file mode 100644 index 000000000..2588434bd --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/AccordionContentElementUpdate/Input.csv @@ -0,0 +1,3 @@ +"tt_content",,, +,uid,pid,CType +,1,1,bootstrap_package_accordion diff --git a/Tests/Functional/Updates/Fixtures/AccordionContentElementUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/AccordionContentElementUpdate/Result.csv new file mode 100644 index 000000000..8991de29c --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/AccordionContentElementUpdate/Result.csv @@ -0,0 +1,3 @@ +"tt_content",,, +,uid,pid,CType +,1,1,accordion diff --git a/Tests/Functional/Updates/Fixtures/AccordionMediaOrientUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/AccordionMediaOrientUpdate/Input.csv new file mode 100644 index 000000000..95884ea7d --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/AccordionMediaOrientUpdate/Input.csv @@ -0,0 +1,4 @@ +"tx_bootstrappackage_accordion_item",,, +,uid,pid,mediaorient +,1,1,0 +,2,1,1 diff --git a/Tests/Functional/Updates/Fixtures/AccordionMediaOrientUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/AccordionMediaOrientUpdate/Result.csv new file mode 100644 index 000000000..d9354af97 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/AccordionMediaOrientUpdate/Result.csv @@ -0,0 +1,4 @@ +"tx_bootstrappackage_accordion_item",,, +,uid,pid,mediaorient +,1,1,left +,2,1,right diff --git a/Tests/Functional/Updates/Fixtures/BackendLayoutUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/BackendLayoutUpdate/Input.csv new file mode 100644 index 000000000..07c48cb0b --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/BackendLayoutUpdate/Input.csv @@ -0,0 +1,35 @@ +"pages",,,, +,uid,pid,backend_layout,backend_layout_next_level +,1,0,pagets__clean,pagets__clean +,2,0,pagets__default_clean,pagets__default_clean +,3,0,pagets__default_2_columns,pagets__default_2_columns +,4,0,pagets__default_2_columns_25_75,pagets__default_2_columns_25_75 +,5,0,pagets__default_2_columns_50_50,pagets__default_2_columns_50_50 +,6,0,pagets__default_2_columns_offset_right,pagets__default_2_columns_offset_right +,7,0,pagets__default_3_columns,pagets__default_3_columns +,8,0,pagets__default_subnavigation_right,pagets__default_subnavigation_right +,9,0,pagets__default_subnavigation_right_2_columns,pagets__default_subnavigation_right_2_columns +,10,0,pagets__default_subnavigation_left,pagets__default_subnavigation_left +,11,0,pagets__default_subnavigation_left_2_columns,pagets__default_subnavigation_left_2_columns +,12,0,pagets__clean, +,13,0,pagets__default_clean, +,14,0,pagets__default_2_columns, +,15,0,pagets__default_2_columns_25_75, +,16,0,pagets__default_2_columns_50_50, +,17,0,pagets__default_2_columns_offset_right, +,18,0,pagets__default_3_columns, +,19,0,pagets__default_subnavigation_right, +,20,0,pagets__default_subnavigation_right_2_columns, +,21,0,pagets__default_subnavigation_left, +,22,0,pagets__default_subnavigation_left_2_columns, +,23,0,,pagets__clean +,24,0,,pagets__default_clean +,25,0,,pagets__default_2_columns +,26,0,,pagets__default_2_columns_25_75 +,27,0,,pagets__default_2_columns_50_50 +,28,0,,pagets__default_2_columns_offset_right +,29,0,,pagets__default_3_columns +,30,0,,pagets__default_subnavigation_right +,31,0,,pagets__default_subnavigation_right_2_columns +,32,0,,pagets__default_subnavigation_left +,34,0,,pagets__default_subnavigation_left_2_columns diff --git a/Tests/Functional/Updates/Fixtures/BackendLayoutUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/BackendLayoutUpdate/Result.csv new file mode 100644 index 000000000..910845f62 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/BackendLayoutUpdate/Result.csv @@ -0,0 +1,35 @@ +"pages",,,, +,uid,pid,backend_layout,backend_layout_next_level +,1,0,pagets__simple,pagets__simple +,2,0,pagets__simple,pagets__simple +,3,0,pagets__2_columns,pagets__2_columns +,4,0,pagets__2_columns_25_75,pagets__2_columns_25_75 +,5,0,pagets__2_columns_50_50,pagets__2_columns_50_50 +,6,0,pagets__2_columns_offset_right,pagets__2_columns_offset_right +,7,0,pagets__3_columns,pagets__3_columns +,8,0,pagets__subnavigation_right,pagets__subnavigation_right +,9,0,pagets__subnavigation_right_2_columns,pagets__subnavigation_right_2_columns +,10,0,pagets__subnavigation_left,pagets__subnavigation_left +,11,0,pagets__subnavigation_left_2_columns,pagets__subnavigation_left_2_columns +,12,0,pagets__simple, +,13,0,pagets__simple, +,14,0,pagets__2_columns, +,15,0,pagets__2_columns_25_75, +,16,0,pagets__2_columns_50_50, +,17,0,pagets__2_columns_offset_right, +,18,0,pagets__3_columns, +,19,0,pagets__subnavigation_right, +,20,0,pagets__subnavigation_right_2_columns, +,21,0,pagets__subnavigation_left, +,22,0,pagets__subnavigation_left_2_columns, +,23,0,,pagets__simple +,24,0,,pagets__simple +,25,0,,pagets__2_columns +,26,0,,pagets__2_columns_25_75 +,27,0,,pagets__2_columns_50_50 +,28,0,,pagets__2_columns_offset_right +,29,0,,pagets__3_columns +,30,0,,pagets__subnavigation_right +,31,0,,pagets__subnavigation_right_2_columns +,32,0,,pagets__subnavigation_left +,34,0,,pagets__subnavigation_left_2_columns diff --git a/Tests/Functional/Updates/Fixtures/BulletContentElementUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/BulletContentElementUpdate/Input.csv new file mode 100644 index 000000000..eebcc7c2e --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/BulletContentElementUpdate/Input.csv @@ -0,0 +1,6 @@ +"tt_content",,,,, +,uid,pid,CType,layout,bullets_type +,1,1,bullets,100,0 +,2,1,bullets,110,0 +,3,1,bullets,120,0 +,4,1,bullets,130,0 diff --git a/Tests/Functional/Updates/Fixtures/BulletContentElementUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/BulletContentElementUpdate/Result.csv new file mode 100644 index 000000000..58121dfcf --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/BulletContentElementUpdate/Result.csv @@ -0,0 +1,6 @@ +"tt_content",,,,, +,uid,pid,CType,layout,bullets_type +,1,1,bullets,0,0 +,2,1,bullets,0,1 +,3,1,bullets,0,0 +,4,1,bullets,0,0 diff --git a/Tests/Functional/Updates/Fixtures/CarouselContentElementUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/CarouselContentElementUpdate/Input.csv new file mode 100644 index 000000000..a1bd0d9b9 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/CarouselContentElementUpdate/Input.csv @@ -0,0 +1,6 @@ +"tt_content",,,, +,uid,pid,CType,layout +,1,1,bootstrap_package_carousel,100 +,2,1,bootstrap_package_carousel,110 +,3,1,bootstrap_package_carousel,120 +,4,1,bootstrap_package_carousel,130 diff --git a/Tests/Functional/Updates/Fixtures/CarouselContentElementUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/CarouselContentElementUpdate/Result.csv new file mode 100644 index 000000000..d6edb3e3c --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/CarouselContentElementUpdate/Result.csv @@ -0,0 +1,6 @@ +"tt_content",,,, +,uid,pid,CType,layout +,1,1,carousel,0 +,2,1,carousel_small,0 +,3,1,carousel_fullscreen,0 +,4,1,carousel,130 diff --git a/Tests/Functional/Updates/Fixtures/CarouselItemLayoutUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/CarouselItemLayoutUpdate/Input.csv new file mode 100644 index 000000000..762cb735b --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/CarouselItemLayoutUpdate/Input.csv @@ -0,0 +1,3 @@ +"tx_bootstrappackage_carousel_item",,, +,uid,pid,layout +,1,1, diff --git a/Tests/Functional/Updates/Fixtures/CarouselItemLayoutUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/CarouselItemLayoutUpdate/Result.csv new file mode 100644 index 000000000..cd4ecf6b8 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/CarouselItemLayoutUpdate/Result.csv @@ -0,0 +1,3 @@ +"tx_bootstrappackage_carousel_item",,, +,uid,pid,layout +,1,1,custom diff --git a/Tests/Functional/Updates/Fixtures/CarouselItemTypeUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/CarouselItemTypeUpdate/Input.csv new file mode 100644 index 000000000..370bfb3c7 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/CarouselItemTypeUpdate/Input.csv @@ -0,0 +1,4 @@ +"tx_bootstrappackage_carousel_item",,, +,uid,pid,item_type +,1,1,textandimage +,2,1,backgroundimage diff --git a/Tests/Functional/Updates/Fixtures/CarouselItemTypeUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/CarouselItemTypeUpdate/Result.csv new file mode 100644 index 000000000..464b5ae6b --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/CarouselItemTypeUpdate/Result.csv @@ -0,0 +1,4 @@ +"tx_bootstrappackage_carousel_item",,, +,uid,pid,item_type +,1,1,text_and_image +,2,1,background_image diff --git a/Tests/Functional/Updates/Fixtures/ExternalMediaContentElementUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/ExternalMediaContentElementUpdate/Input.csv new file mode 100644 index 000000000..30c4ad5a1 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/ExternalMediaContentElementUpdate/Input.csv @@ -0,0 +1,3 @@ +"tt_content",,, +,uid,pid,CType +,1,1,bootstrap_package_external_media diff --git a/Tests/Functional/Updates/Fixtures/ExternalMediaContentElementUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/ExternalMediaContentElementUpdate/Result.csv new file mode 100644 index 000000000..764c5edb0 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/ExternalMediaContentElementUpdate/Result.csv @@ -0,0 +1,3 @@ +"tt_content",,, +,uid,pid,CType +,1,1,external_media diff --git a/Tests/Functional/Updates/Fixtures/FrameClassToBackgroundUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/FrameClassToBackgroundUpdate/Input.csv new file mode 100644 index 000000000..f6f29608d --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/FrameClassToBackgroundUpdate/Input.csv @@ -0,0 +1,4 @@ +"tt_content",,,, +,uid,pid,frame_class,background_color_class +,1,1,well, +,2,1,jumbotron, diff --git a/Tests/Functional/Updates/Fixtures/FrameClassToBackgroundUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/FrameClassToBackgroundUpdate/Result.csv new file mode 100644 index 000000000..c711a48e3 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/FrameClassToBackgroundUpdate/Result.csv @@ -0,0 +1,4 @@ +"tt_content",,,, +,uid,pid,frame_class,background_color_class +,1,1,default,light +,2,1,default,primary diff --git a/Tests/Functional/Updates/Fixtures/FrameClassToOptionsUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/FrameClassToOptionsUpdate/Input.csv new file mode 100644 index 000000000..a1212b464 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/FrameClassToOptionsUpdate/Input.csv @@ -0,0 +1,7 @@ +"tt_content",,,, +,uid,pid,frame_class,frame_options +,1,1,ruler-before, +,2,1,ruler-after, +,3,1,indent, +,4,1,indent-left, +,5,1,indent-right, diff --git a/Tests/Functional/Updates/Fixtures/FrameClassToOptionsUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/FrameClassToOptionsUpdate/Result.csv new file mode 100644 index 000000000..68d1b3c0f --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/FrameClassToOptionsUpdate/Result.csv @@ -0,0 +1,7 @@ +"tt_content",,,, +,uid,pid,frame_class,frame_options +,1,1,default,ruler-before +,2,1,default,ruler-after +,3,1,default,"indent-left,indent-right" +,4,1,default,indent-left +,5,1,default,indent-right diff --git a/Tests/Functional/Updates/Fixtures/FrameClassUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/FrameClassUpdate/Input.csv new file mode 100644 index 000000000..1433e7675 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/FrameClassUpdate/Input.csv @@ -0,0 +1,12 @@ +"tt_content",,,, +,uid,pid,section_frame,frame_class +,1,1,0,default +,2,1,5,default +,3,1,6,default +,4,1,10,default +,5,1,11,default +,6,1,12,default +,7,1,20,default +,8,1,21,default +,9,1,66,default +,10,1,100,default diff --git a/Tests/Functional/Updates/Fixtures/FrameClassUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/FrameClassUpdate/Result.csv new file mode 100644 index 000000000..1db10f31a --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/FrameClassUpdate/Result.csv @@ -0,0 +1,12 @@ +"tt_content",,,, +,uid,pid,section_frame,frame_class +,1,1,0,default +,2,1,0,ruler-before +,3,1,0,ruler-after +,4,1,0,indent +,5,1,0,indent-left +,6,1,0,indent-right +,7,1,0,well +,8,1,0,jumbotron +,9,1,0,none +,10,1,0,custom-100 diff --git a/Tests/Functional/Updates/Fixtures/ListGroupContentElementUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/ListGroupContentElementUpdate/Input.csv new file mode 100644 index 000000000..48e424690 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/ListGroupContentElementUpdate/Input.csv @@ -0,0 +1,3 @@ +"tt_content",,, +,uid,pid,CType +,1,1,bootstrap_package_listgroup diff --git a/Tests/Functional/Updates/Fixtures/ListGroupContentElementUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/ListGroupContentElementUpdate/Result.csv new file mode 100644 index 000000000..d8cc8da98 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/ListGroupContentElementUpdate/Result.csv @@ -0,0 +1,3 @@ +"tt_content",,, +,uid,pid,CType +,1,1,listgroup diff --git a/Tests/Functional/Updates/Fixtures/PanelContentElementUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/PanelContentElementUpdate/Input.csv new file mode 100644 index 000000000..e69df15fd --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/PanelContentElementUpdate/Input.csv @@ -0,0 +1,8 @@ +"tt_content",,,,, +,uid,pid,CType,layout,panel_class +,1,1,bootstrap_package_panel,0,default +,2,1,bootstrap_package_panel,110,default +,3,1,bootstrap_package_panel,120,default +,4,1,bootstrap_package_panel,130,default +,5,1,bootstrap_package_panel,140,default +,6,1,bootstrap_package_panel,150,default diff --git a/Tests/Functional/Updates/Fixtures/PanelContentElementUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/PanelContentElementUpdate/Result.csv new file mode 100644 index 000000000..6b7ffc937 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/PanelContentElementUpdate/Result.csv @@ -0,0 +1,8 @@ +"tt_content",,,,, +,uid,pid,CType,layout,panel_class +,1,1,panel,0,default +,2,1,panel,0,primary +,3,1,panel,0,success +,4,1,panel,0,info +,5,1,panel,0,warning +,6,1,panel,0,danger diff --git a/Tests/Functional/Updates/Fixtures/TabContentElementUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/TabContentElementUpdate/Input.csv new file mode 100644 index 000000000..90f388b27 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TabContentElementUpdate/Input.csv @@ -0,0 +1,3 @@ +"tt_content",,, +,uid,pid,CType +,1,1,bootstrap_package_tab diff --git a/Tests/Functional/Updates/Fixtures/TabContentElementUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/TabContentElementUpdate/Result.csv new file mode 100644 index 000000000..56a92abf7 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TabContentElementUpdate/Result.csv @@ -0,0 +1,3 @@ +"tt_content",,, +,uid,pid,CType +,1,1,tab diff --git a/Tests/Functional/Updates/Fixtures/TabMediaOrientUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/TabMediaOrientUpdate/Input.csv new file mode 100644 index 000000000..f15e781a2 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TabMediaOrientUpdate/Input.csv @@ -0,0 +1,4 @@ +"tx_bootstrappackage_tab_item",,, +,uid,pid,mediaorient +,1,1,0 +,2,1,1 diff --git a/Tests/Functional/Updates/Fixtures/TabMediaOrientUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/TabMediaOrientUpdate/Result.csv new file mode 100644 index 000000000..3158cff2c --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TabMediaOrientUpdate/Result.csv @@ -0,0 +1,4 @@ +"tx_bootstrappackage_tab_item",,, +,uid,pid,mediaorient +,1,1,left +,2,1,right diff --git a/Tests/Functional/Updates/Fixtures/TableContentElementUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/TableContentElementUpdate/Input.csv new file mode 100644 index 000000000..439ae46b1 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TableContentElementUpdate/Input.csv @@ -0,0 +1,8 @@ +"tt_content",,,,, +,uid,pid,CType,layout,table_class +,1,1,table,100, +,2,1,table,110, +,3,1,table,120, +,4,1,table,130, +,5,1,table,140, +,6,1,table,150, diff --git a/Tests/Functional/Updates/Fixtures/TableContentElementUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/TableContentElementUpdate/Result.csv new file mode 100644 index 000000000..ea0019ba8 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TableContentElementUpdate/Result.csv @@ -0,0 +1,8 @@ +"tt_content",,,,, +,uid,pid,CType,layout,table_class +,1,1,table,0, +,2,1,table,0, +,3,1,table,0,striped +,4,1,table,0,bordered +,5,1,table,0,hover +,6,1,table,0,condensed diff --git a/Tests/Functional/Updates/Fixtures/TexticonContentElementUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/TexticonContentElementUpdate/Input.csv new file mode 100644 index 000000000..900646126 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TexticonContentElementUpdate/Input.csv @@ -0,0 +1,3 @@ +"tt_content",,, +,uid,pid,CType +,1,1,bootstrap_package_texticon diff --git a/Tests/Functional/Updates/Fixtures/TexticonContentElementUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/TexticonContentElementUpdate/Result.csv new file mode 100644 index 000000000..27e2828c6 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TexticonContentElementUpdate/Result.csv @@ -0,0 +1,3 @@ +"tt_content",,, +,uid,pid,CType +,1,1,texticon diff --git a/Tests/Functional/Updates/Fixtures/TexticonIconUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/TexticonIconUpdate/Input.csv new file mode 100644 index 000000000..12ffc2cdb --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TexticonIconUpdate/Input.csv @@ -0,0 +1,4 @@ +"tt_content",,,, +,uid,pid,icon,icon_set +,1,1,Glyphicons__demo, +,2,1,Ionicons__demo, diff --git a/Tests/Functional/Updates/Fixtures/TexticonIconUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/TexticonIconUpdate/Result.csv new file mode 100644 index 000000000..1ef18df85 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TexticonIconUpdate/Result.csv @@ -0,0 +1,4 @@ +"tt_content",,,, +,uid,pid,icon,icon_set +,1,1,EXT:bootstrap_package/Resources/Public/Images/Icons/Glyphicons/demo.svg,EXT:bootstrap_package/Resources/Public/Images/Icons/Glyphicons/ +,2,1,EXT:bootstrap_package/Resources/Public/Images/Icons/Ionicons/demo.svg,EXT:bootstrap_package/Resources/Public/Images/Icons/Ionicons/ diff --git a/Tests/Functional/Updates/Fixtures/TexticonSizeUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/TexticonSizeUpdate/Input.csv new file mode 100644 index 000000000..3001ccab1 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TexticonSizeUpdate/Input.csv @@ -0,0 +1,6 @@ +"tt_content",,, +,uid,pid,icon_size +,1,1,0 +,2,1,1 +,3,1,2 +,4,1,3 diff --git a/Tests/Functional/Updates/Fixtures/TexticonSizeUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/TexticonSizeUpdate/Result.csv new file mode 100644 index 000000000..3652fb363 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TexticonSizeUpdate/Result.csv @@ -0,0 +1,6 @@ +"tt_content",,, +,uid,pid,icon_size +,1,1,default +,2,1,medium +,3,1,large +,4,1,awesome diff --git a/Tests/Functional/Updates/Fixtures/TexticonTypeUpdate/Input.csv b/Tests/Functional/Updates/Fixtures/TexticonTypeUpdate/Input.csv new file mode 100644 index 000000000..ab748c397 --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TexticonTypeUpdate/Input.csv @@ -0,0 +1,5 @@ +"tt_content",,, +,uid,pid,icon_type +,1,1,0 +,2,1,1 +,3,1,2 diff --git a/Tests/Functional/Updates/Fixtures/TexticonTypeUpdate/Result.csv b/Tests/Functional/Updates/Fixtures/TexticonTypeUpdate/Result.csv new file mode 100644 index 000000000..ee8fcaf4b --- /dev/null +++ b/Tests/Functional/Updates/Fixtures/TexticonTypeUpdate/Result.csv @@ -0,0 +1,5 @@ +"tt_content",,, +,uid,pid,icon_type +,1,1,default +,2,1,square +,3,1,circle diff --git a/Tests/Functional/Updates/FrameClassToBackgroundUpdateTest.php b/Tests/Functional/Updates/FrameClassToBackgroundUpdateTest.php new file mode 100644 index 000000000..7b767502c --- /dev/null +++ b/Tests/Functional/Updates/FrameClassToBackgroundUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new FrameClassToBackgroundUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/FrameClassToBackgroundUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/FrameClassToBackgroundUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/FrameClassToBackgroundUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/FrameClassToOptionsUpdateTest.php b/Tests/Functional/Updates/FrameClassToOptionsUpdateTest.php new file mode 100644 index 000000000..598f2b2c7 --- /dev/null +++ b/Tests/Functional/Updates/FrameClassToOptionsUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new FrameClassToOptionsUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/FrameClassToOptionsUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/FrameClassToOptionsUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/FrameClassToOptionsUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/FrameClassUpdateTest.php b/Tests/Functional/Updates/FrameClassUpdateTest.php new file mode 100644 index 000000000..b1680647d --- /dev/null +++ b/Tests/Functional/Updates/FrameClassUpdateTest.php @@ -0,0 +1,56 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content'); + $connection->executeQuery('ALTER TABLE tt_content ADD section_frame int(11) unsigned DEFAULT "0" NOT NULL;'); + + $subject = new FrameClassUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/FrameClassUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/FrameClassUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/FrameClassUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/ListGroupContentElementUpdateTest.php b/Tests/Functional/Updates/ListGroupContentElementUpdateTest.php new file mode 100644 index 000000000..cc5912cb0 --- /dev/null +++ b/Tests/Functional/Updates/ListGroupContentElementUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new ListGroupContentElementUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/ListGroupContentElementUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/ListGroupContentElementUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/ListGroupContentElementUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/PanelContentElementUpdateTest.php b/Tests/Functional/Updates/PanelContentElementUpdateTest.php new file mode 100644 index 000000000..84880a858 --- /dev/null +++ b/Tests/Functional/Updates/PanelContentElementUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new PanelContentElementUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/PanelContentElementUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/PanelContentElementUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/PanelContentElementUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/TabContentElementUpdateTest.php b/Tests/Functional/Updates/TabContentElementUpdateTest.php new file mode 100644 index 000000000..1933275d2 --- /dev/null +++ b/Tests/Functional/Updates/TabContentElementUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new TabContentElementUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/TabContentElementUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TabContentElementUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TabContentElementUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/TabMediaOrientUpdateTest.php b/Tests/Functional/Updates/TabMediaOrientUpdateTest.php new file mode 100644 index 000000000..f7066f264 --- /dev/null +++ b/Tests/Functional/Updates/TabMediaOrientUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new TabMediaOrientUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/TabMediaOrientUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TabMediaOrientUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TabMediaOrientUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/TableContentElementUpdateTest.php b/Tests/Functional/Updates/TableContentElementUpdateTest.php new file mode 100644 index 000000000..9eda7e4d7 --- /dev/null +++ b/Tests/Functional/Updates/TableContentElementUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new TableContentElementUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/TableContentElementUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TableContentElementUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TableContentElementUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/TexticonContentElementUpdateTest.php b/Tests/Functional/Updates/TexticonContentElementUpdateTest.php new file mode 100644 index 000000000..5245004de --- /dev/null +++ b/Tests/Functional/Updates/TexticonContentElementUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new TexticonContentElementUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/TexticonContentElementUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TexticonContentElementUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TexticonContentElementUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/TexticonIconUpdateTest.php b/Tests/Functional/Updates/TexticonIconUpdateTest.php new file mode 100644 index 000000000..910791867 --- /dev/null +++ b/Tests/Functional/Updates/TexticonIconUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new TexticonIconUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/TexticonIconUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TexticonIconUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TexticonIconUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/TexticonSizeUpdateTest.php b/Tests/Functional/Updates/TexticonSizeUpdateTest.php new file mode 100644 index 000000000..780af7883 --- /dev/null +++ b/Tests/Functional/Updates/TexticonSizeUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new TexticonSizeUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/TexticonSizeUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TexticonSizeUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TexticonSizeUpdate/Result.csv'); + } +} diff --git a/Tests/Functional/Updates/TexticonTypeUpdateTest.php b/Tests/Functional/Updates/TexticonTypeUpdateTest.php new file mode 100644 index 000000000..cd371ff81 --- /dev/null +++ b/Tests/Functional/Updates/TexticonTypeUpdateTest.php @@ -0,0 +1,51 @@ +updateNecessary()); + } + + /** + * @test + */ + public function updateTest(): void + { + $subject = new TexticonTypeUpdate(); + $this->importCSVDataSet(__DIR__ . '/Fixtures/TexticonTypeUpdate/Input.csv'); + self::assertTrue($subject->updateNecessary()); + $subject->executeUpdate(); + self::assertFalse($subject->updateNecessary()); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TexticonTypeUpdate/Result.csv'); + + // Just ensure that running the upgrade again does not change anything + $subject->executeUpdate(); + $this->assertCSVDataSet(__DIR__ . '/Fixtures/TexticonTypeUpdate/Result.csv'); + } +}