From babec0f29b47fb878d4b144913c6f1e567b186ec Mon Sep 17 00:00:00 2001 From: Simon Wisselink Date: Sun, 22 Oct 2023 22:41:21 +0200 Subject: [PATCH] add case sensitivity test --- .../RegisterFunction/RegisterFunctionTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php index 7c738505..473cbb0b 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php @@ -166,6 +166,18 @@ class RegisterFunctionTest extends PHPUnit_Smarty $this->smarty->unregisterPlugin(Smarty::PLUGIN_FUNCTION, 'testfunction'); $this->assertIsArray($this->smarty->getRegisteredPlugin(Smarty::PLUGIN_BLOCK, 'testfunction')); } + + /** + * Test case (in)sensitivy of plugin functions + * @return void + * @throws \Smarty\Exception + * @group issue907 + */ + public function testCaseSensitivity() { + $this->smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'customTag', 'myfunction'); + $this->assertEquals('hello world ', $this->smarty->fetch('string:{customTag}')); + } + } function myfunction($params, $smarty)