mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
update resource tests
This commit is contained in:
@@ -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}'");
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user