[FOLLOWUP][BUGFIX] EXT:form - themeName can not be overwritten by integrator
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Tests / Unit / Domain / Model / ConfigurationTest.php
index d6665b9..49fb8ee 100644 (file)
@@ -55,16 +55,21 @@ class ConfigurationTest extends UnitTestCase {
        /**
         * @param array $typoScript
         * @param bool $globalCompatibilityMode
+        * @param string $globalThemeName
         * @param array $expected
         *
         * @test
         * @dataProvider propertiesAreUpdatedFromTypoScriptDataProvider
         */
-       public function propertiesAreUpdatedFromTypoScript(array $typoScript, $globalCompatibilityMode, array $expected) {
+       public function propertiesAreUpdatedFromTypoScript(array $typoScript, $globalCompatibilityMode, $globalThemeName, array $expected) {
                $this->typoScriptRepositoryProphecy
                        ->getModelConfigurationByScope('FORM', 'compatibilityMode')
                        ->willReturn($globalCompatibilityMode);
 
+               $this->typoScriptRepositoryProphecy
+                       ->getModelConfigurationByScope('FORM', 'themeName')
+                       ->willReturn($globalThemeName);
+
                $this->subject->setTypoScript($typoScript);
                $this->assertEquals($expected['prefix'], $this->subject->getPrefix());
                $this->assertEquals($expected['compatibility'], $this->subject->getCompatibility());
@@ -84,6 +89,7 @@ class ConfigurationTest extends UnitTestCase {
                                        'disableContentElement' => FALSE,
                                ),
                                FALSE,
+                               '',
                                array(
                                        'prefix' => 'form',
                                        'themeName' => 'Default',
@@ -99,6 +105,7 @@ class ConfigurationTest extends UnitTestCase {
                                        'disableContentElement' => FALSE,
                                ),
                                TRUE,
+                               '',
                                array(
                                        'prefix' => 'form',
                                        'themeName' => 'Default',
@@ -114,6 +121,7 @@ class ConfigurationTest extends UnitTestCase {
                                        'disableContentElement' => TRUE,
                                ),
                                TRUE,
+                               '',
                                array(
                                        'prefix' => 'somePrefix',
                                        'themeName' => 'someTheme',
@@ -129,6 +137,7 @@ class ConfigurationTest extends UnitTestCase {
                                        'disableContentElement' => TRUE,
                                ),
                                FALSE,
+                               '',
                                array(
                                        'prefix' => 'somePrefix',
                                        'themeName' => 'someTheme',
@@ -144,6 +153,7 @@ class ConfigurationTest extends UnitTestCase {
                                        'disableContentElement' => TRUE,
                                ),
                                TRUE,
+                               '',
                                array(
                                        'prefix' => 'somePrefix',
                                        'themeName' => 'someTheme',
@@ -159,6 +169,7 @@ class ConfigurationTest extends UnitTestCase {
                                        'disableContentElement' => TRUE,
                                ),
                                FALSE,
+                               '',
                                array(
                                        'prefix' => 'somePrefix',
                                        'themeName' => 'someTheme',
@@ -166,6 +177,22 @@ class ConfigurationTest extends UnitTestCase {
                                        'contentElementRendering' => FALSE,
                                ),
                        ),
+                       '#7' => array(
+                               array(
+                                       'prefix' => '',
+                                       'themeName' => '',
+                                       'compatibilityMode' => FALSE,
+                                       'disableContentElement' => FALSE,
+                               ),
+                               FALSE,
+                               'globalTheme',
+                               array(
+                                       'prefix' => 'form',
+                                       'themeName' => 'globalTheme',
+                                       'compatibility' => FALSE,
+                                       'contentElementRendering' => TRUE,
+                               ),
+                       ),
                );
        }