From e390da71e2733478bbf678c84aad61112681cc08 Mon Sep 17 00:00:00 2001 From: uwetews Date: Wed, 30 Dec 2015 22:27:16 +0100 Subject: [PATCH] https://github.com/smarty-php/smarty/issues/147 --- .../TemplateSource/TagTests/Php/CompilePhpTest.php | 8 ++++++++ .../TagTests/Php/PHPunitplugins/function.phptest.php | 5 +++++ 2 files changed, 13 insertions(+) create mode 100644 tests/UnitTests/TemplateSource/TagTests/Php/PHPunitplugins/function.phptest.php diff --git a/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php b/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php index 33586b7b..1463b5fd 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php @@ -93,6 +93,14 @@ class CompilePhpTest extends PHPUnit_Smarty $content = $this->smartyBC->fetch("string:aa {php no cache} echo 'hallo'; {/php} ae"); } + /** + * Test regression that plugin names starting with 'php' do work + */ + public function testPHPfooPlugin() + { + $this->smarty->addPluginsDir("./PHPunitplugins/"); + $this->assertEquals('phptest okay', $this->smarty->fetch('string:{phptest}')); + } public function data() { diff --git a/tests/UnitTests/TemplateSource/TagTests/Php/PHPunitplugins/function.phptest.php b/tests/UnitTests/TemplateSource/TagTests/Php/PHPunitplugins/function.phptest.php new file mode 100644 index 00000000..922609e4 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Php/PHPunitplugins/function.phptest.php @@ -0,0 +1,5 @@ +