diff --git a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php index 18176705..610c7f35 100644 --- a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php @@ -104,12 +104,22 @@ class CompileConfigLoadTest extends PHPUnit_Smarty } /** - * @runInSeparateProcess + * @run InSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableOverwrite_006() { - $this->assertEquals("Overwrite3", $this->smarty->fetch('006_overwrite.tpl')); + $this->assertEquals("Welcome to Smarty! Overwrite3", $this->smarty->fetch('006_overwrite.tpl')); + } + /** + * @run InSeparateProcess + * @preserveGlobalState disabled + */ + public function testConfigVariableOverwrite_0061() + { + $this->smarty->configLoad('test.conf', 'default'); + $this->smarty->configLoad('test2.conf', 'default'); + $this->assertEquals('Welcome to overwrite test! this overwitten', $this->smarty->fetch('0061_overwrite.tpl')); } /** diff --git a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/configs/test.conf b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/configs/test.conf index 9bd1731c..cd5cd4dd 100644 --- a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/configs/test.conf +++ b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/configs/test.conf @@ -29,6 +29,10 @@ sec = section foo/bar [section1] sec1 = Hello Section1 +[default] +title = Welcome to overwrite test! +over = shall not show + [section2] sec2 = 'Hello Section2' diff --git a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/configs/test2.conf b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/configs/test2.conf index 26578eee..94f31bc4 100644 --- a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/configs/test2.conf +++ b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/configs/test2.conf @@ -1,2 +1,5 @@ overwrite = Overwrite3 + +[default] +over = this overwitten \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/templates/0061_overwrite.tpl b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/templates/0061_overwrite.tpl new file mode 100644 index 00000000..e82e5c74 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/templates/0061_overwrite.tpl @@ -0,0 +1 @@ +{#title#} {#over#} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/templates/006_overwrite.tpl b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/templates/006_overwrite.tpl index 106037dd..5f5abfbf 100644 --- a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/templates/006_overwrite.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/templates/006_overwrite.tpl @@ -1 +1 @@ -{config_load 'test.conf'}{config_load 'test2.conf'}{#overwrite#} \ No newline at end of file +{config_load 'test.conf'}{config_load 'test2.conf'}{#title#} {#overwrite#} \ No newline at end of file