diff --git a/tests/PHPUnit_Smarty.php b/tests/PHPUnit_Smarty.php index 88cec7dd..825e957b 100644 --- a/tests/PHPUnit_Smarty.php +++ b/tests/PHPUnit_Smarty.php @@ -557,6 +557,20 @@ KEY `expire` (`expire`) } } + /** + * prefilter to insert test number + * + * @param string $source + * @param \Smarty_Internal_Template $tpl + * + * @return string + */ + public function prefilterTest($source, Smarty_Internal_Template $tpl) + { + return str_replace('#test#', "test:{\$test nocache} compiled:{$tpl->getTemplateVars('test')} rendered:{\$test}", + $source); + } + /** * Tears down the fixture * This method is called after a test is executed.