From d72ced4e7016b752c01c480788ece684b3dba010 Mon Sep 17 00:00:00 2001 From: uwetews Date: Wed, 30 Dec 2015 00:28:27 +0100 Subject: [PATCH] Smarty2 wrapper tests --- .../RegisterFunction/RegisterFunctionTest.php | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php index 19779e77..a83caf71 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php @@ -38,17 +38,6 @@ class RegisterFunctionTest extends PHPUnit_Smarty $this->assertEquals('hello world 1', $this->smarty->fetch('string:{testfunction value=1}')); } - /** - * test wrapper for register_function method - */ - public function testRegisterFunctionWrapper() - { - $this->smarty->register_function('testfunction', 'myfunction'); - $this->assertEquals('myfunction', - $this->smarty->registered_plugins[ Smarty::PLUGIN_FUNCTION ][ 'testfunction' ][ 0 ]); - $this->assertEquals('hello world 12', $this->smarty->fetch('string:{testfunction value=12}')); - } - /** * test SmartyBC for register_function method */ @@ -70,15 +59,6 @@ class RegisterFunctionTest extends PHPUnit_Smarty $this->assertEquals('hello world 2', $this->smarty->fetch('string:{testfunction value=2}')); } - /** - * test register_function wrapper method for function plugin by class - */ - public function testRegisterFunctionClassWrapper() - { - $this->smarty->register_function('testfunction', array('myfunctionclass', 'execute')); - $this->assertEquals('hello world 12', $this->smarty->fetch('string:{testfunction value=12}')); - } - /** * test register_function SmartyBC method for function plugin by class */ @@ -98,16 +78,6 @@ class RegisterFunctionTest extends PHPUnit_Smarty $this->assertEquals('hello world 3', $this->smarty->fetch('string:{testfunction value=3}')); } - /** - * test register_function wrapper method for function plugin by object - */ - public function testRegisterFunctionObjectWrapper() - { - $myfunction_object = new myfunctionclass; - $this->smarty->register_function('testfunction', array($myfunction_object, 'execute')); - $this->assertEquals('hello world 13', $this->smarty->fetch('string:{testfunction value=13}')); - } - /** * test register_function SmartyBC method for function plugin by object */ @@ -222,16 +192,6 @@ class RegisterFunctionTest extends PHPUnit_Smarty $this->assertFalse(isset($this->smarty->registered_plugins[ Smarty::PLUGIN_FUNCTION ][ 'testfunction' ])); } - /** - * test unregister_function method - */ - public function testUnregisterFunctionWrapper() - { - $this->smarty->register_function('testfunction', 'myfunction'); - $this->smarty->unregister_function('testfunction'); - $this->assertFalse(isset($this->smarty->registered_plugins[ Smarty::PLUGIN_FUNCTION ][ 'testfunction' ])); - } - public function testUnregisterFunctionSmartyBC() { $this->smartyBC->register_function('testfunction', 'myfunction');