update resource tests

This commit is contained in:
uwetews
2016-09-15 09:09:00 +02:00
parent 0d5dab3b66
commit 998b28dcc8
2 changed files with 5 additions and 3 deletions

View File

@@ -379,7 +379,8 @@ KEY `expire` (`expire`)
case 'mysql':
return sha1($type . ':' . $name);
case 'string':
return sha1($name);
$this->smarty->getTemplateDir();
return sha1($name . $this->smarty->_joined_template_dir);
default:
throw new Exception("Unhandled source resource type '{$type}'");
}
@@ -413,7 +414,8 @@ KEY `expire` (`expire`)
case 'mysql':
return sha1($type . ':' . $name);
case 'string':
return sha1($name);
$this->smarty->getTemplateDir();
return sha1($name . $this->smarty->_joined_template_dir);
default:
throw new Exception("Unhandled source resource type '{$type}'");
}

View File

@@ -56,7 +56,7 @@ class StringResourceTest extends PHPUnit_Smarty
public function testGetTemplateFilepath()
{
$tpl = $this->smarty->createTemplate('string:hello world');
$this->assertEquals('2aae6c35c94fcfb415dbe95f408b9ce91ee846ed', $tpl->source->filepath);
$this->assertEquals('f2611951e67556edb47cb258ac23fede8ba704bd', $tpl->source->filepath);
}
/**