mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
Update
This commit is contained in:
@@ -45,49 +45,4 @@ class CacheResourceCustomMemcacheTest extends CacheResourceTestCommon
|
|||||||
{
|
{
|
||||||
$this->assertEquals(- 1, $b);
|
$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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user