clear static tag compiler object cache

This commit is contained in:
uwetews
2016-02-15 14:19:01 +01:00
parent 3dcb718b5d
commit 13c7a912d9

View File

@@ -77,7 +77,8 @@ class PHPUnit_Smarty extends PHPUnit_Framework_TestCase
*
* @var array
*/
protected $backupStaticAttributesBlacklist = array('PHPUnit_Smarty' => array('config', 'pdo', 'init', 'testNumver'),);
protected $backupStaticAttributesBlacklist = array('PHPUnit_Smarty' => array('config', 'pdo', 'init',
'testNumver'),);
/**
* This method is called before the first test of this test class is run.
@@ -622,6 +623,11 @@ KEY `expire` (`expire`)
*/
protected function tearDown()
{
if (class_exists('Smarty_Internal_TemplateCompilerBase') &&
isset(Smarty_Internal_TemplateCompilerBase::$_tag_objects)
) {
Smarty_Internal_TemplateCompilerBase::$_tag_objects = array();
}
if (isset($this->smarty->smarty)) {
$this->smarty->smarty = null;
}