This commit is contained in:
uwetews
2015-12-24 01:56:38 +01:00
parent 09d29deeea
commit b4613146b4

View File

@@ -45,49 +45,4 @@ class CacheResourceCustomMemcacheTest extends CacheResourceTestCommon
{
$this->assertEquals(- 1, $b);
}
public function testGetCachedFilepathSubDirs()
{
$this->smarty->caching = true;
$this->smarty->cache_lifetime = 1000;
$tpl = $this->smarty->createTemplate('helloworld.tpl');
$sha1 = $tpl->source->uid . '#helloworld_tpl##';
$this->assertEquals($sha1, $tpl->cached->filepath);
}
/**
* test getCachedFilepath with cache_id
*/
public function testGetCachedFilepathCacheId()
{
$this->smarty->caching = true;
$this->smarty->cache_lifetime = 1000;
$tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar');
$sha1 = $tpl->source->uid . '#helloworld_tpl#foo|bar#';
$this->assertEquals($sha1, $tpl->cached->filepath);
}
/**
* test getCachedFilepath with compile_id
*/
public function testGetCachedFilepathCompileId()
{
$this->smarty->caching = true;
$this->smarty->cache_lifetime = 1000;
$tpl = $this->smarty->createTemplate('helloworld.tpl', null, 'blar');
$sha1 = $tpl->source->uid . '#helloworld_tpl##blar';
$this->assertEquals($sha1, $tpl->cached->filepath);
}
/**
* test getCachedFilepath with cache_id and compile_id
*/
public function testGetCachedFilepathCacheIdCompileId()
{
$this->smarty->caching = true;
$this->smarty->cache_lifetime = 1000;
$tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar');
$sha1 = $tpl->source->uid . '#helloworld_tpl#foo|bar#blar';
$this->assertEquals($sha1, $tpl->cached->filepath);
}
}