diff --git a/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php b/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php index effbf613..aa1764f3 100644 --- a/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php +++ b/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php @@ -56,6 +56,10 @@ class DefaultPluginHandlerTest extends PHPUnit_Smarty { $this->assertEquals("echo 'scriptcompilerfunction '.'foo bar';", $this->smarty->fetch('test_default_compiler_function_script.tpl')); } + public function testDefaultCompilerObject() + { + $this->assertEquals('Public World', $this->smarty->fetch('test_default_compiler_object.tpl')); + } public function testDefaultBlockScript() { @@ -117,7 +121,9 @@ function my_plugin_handler($tag, $type, $template, &$callback, &$script, &$cacha case 'scriptcompilerfunction': $script = './scripts/script_compiler_function_tag.php'; $callback = 'default_script_compiler_function_tag'; - + return true; + case 'compilerobject': + $callback = array(new CompilerDefaultPluginClass, 'compile'); return true; default: return false; @@ -165,3 +171,12 @@ function default_local_modifier($input) { return 'localmodifier ' . $input; } +class CompilerDefaultPluginClass +{ + static function statCompile ($params, $compiler) { + return ''; + } + public function compile ($params, $compiler) { + return ''; + } +} \ No newline at end of file diff --git a/tests/UnitTests/A_Core/LoadPlugin/templates/test_default_compiler_object.tpl b/tests/UnitTests/A_Core/LoadPlugin/templates/test_default_compiler_object.tpl new file mode 100644 index 00000000..62fa3798 --- /dev/null +++ b/tests/UnitTests/A_Core/LoadPlugin/templates/test_default_compiler_object.tpl @@ -0,0 +1 @@ +{compilerobject value='foo bar'} \ No newline at end of file