From fb7908d710b26344709234789552d54a8c45564e Mon Sep 17 00:00:00 2001 From: uwetews Date: Sat, 2 Jan 2016 02:53:18 +0100 Subject: [PATCH] add missing plugin --- .../PHPunitplugins/function.checkvar.php | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tests/UnitTests/TemplateSource/TagTests/Assign/PHPunitplugins/function.checkvar.php diff --git a/tests/UnitTests/TemplateSource/TagTests/Assign/PHPunitplugins/function.checkvar.php b/tests/UnitTests/TemplateSource/TagTests/Assign/PHPunitplugins/function.checkvar.php new file mode 100644 index 00000000..08375bc7 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Assign/PHPunitplugins/function.checkvar.php @@ -0,0 +1,44 @@ +source->name}:var ="; + $output .= isset($ptr->tpl_vars[$var]) ? $ptr->tpl_vars[$var] : 'null'; + $output .= "\n"; + $ptr = $ptr->parent; + } elseif ($ptr instanceof Smarty_Data) { + $output .= "data:var ="; + $output .= isset($ptr->tpl_vars[$var]) ? $ptr->tpl_vars[$var] : 'null'; + $output .= "\n"; + $ptr = $ptr->parent; + } else { + $ptr = null; + } + } + $output .= "Smarty:var ="; + $output .= isset($template->smarty->tpl_vars[$var]) ? $template->smarty->tpl_vars[$var] : 'null'; + $output .= "\n"; + $output .= "global:var ="; + $output .= isset(Smarty::$global_tpl_vars[$var]) ? Smarty::$global_tpl_vars[$var] : 'null'; + $output .= "\n"; + return $output; +}