From 034d2c530245e96f60d296945d6afa672569a41a Mon Sep 17 00:00:00 2001 From: Daniel Goerz <ervaude@gmail.com> Date: Wed, 7 Oct 2015 20:27:42 +0200 Subject: [PATCH] [FOLLOWUP][BUGFIX] EXT:form - themeName can not be overwritten by integrator This patch fixes the broken unit tests. Change-Id: Ie180a13dfc51c8a3a6fdb63a0a4842b69ff7236a Resolves: #70368 Releases: master Reviewed-on: http://review.typo3.org/43896 Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by: Frans Saris <franssaris@gmail.com> Tested-by: Frans Saris <franssaris@gmail.com> --- .../Unit/Domain/Model/ConfigurationTest.php | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/typo3/sysext/form/Tests/Unit/Domain/Model/ConfigurationTest.php b/typo3/sysext/form/Tests/Unit/Domain/Model/ConfigurationTest.php index d6665b998d91..49fb8eee5260 100644 --- a/typo3/sysext/form/Tests/Unit/Domain/Model/ConfigurationTest.php +++ b/typo3/sysext/form/Tests/Unit/Domain/Model/ConfigurationTest.php @@ -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, + ), + ), ); } -- GitLab