调整template相关test case

This commit is contained in:
Gaozhen Ying
2017-10-26 20:17:43 +08:00
parent 0ba3eb1c9c
commit 4005af6f26
11 changed files with 318 additions and 314 deletions

View File

@@ -12,6 +12,7 @@
namespace think;
use think\exception\TemplateNotFoundException;
use think\template\TagLib;
/**
* ThinkPHP分离出来的模板引擎
@@ -121,7 +122,7 @@ class Template
* 模板引擎配置项
* @access public
* @param array|string $config
* @return void|array
* @return string|void|array
*/
public function config($config)
{
@@ -235,7 +236,7 @@ class Template
* @access public
* @param mixed $name 布局模板名称 false 则关闭布局
* @param string $replace 布局模板内容替换标识
* @return object
* @return Template
*/
public function layout($name, $replace = '')
{
@@ -689,6 +690,7 @@ class Template
} else {
$className = '\\think\\template\\taglib\\' . ucwords($tagLib);
}
/** @var Taglib $tLib */
$tLib = new $className($this);
$tLib->parseTag($content, $hide ? '' : $tagLib);
return;
@@ -1071,7 +1073,7 @@ class Template
} else {
$path = isset($module) ? APP_PATH . $module . DS . basename($this->config['view_path']) . DS : $this->config['view_path'];
}
$template = $path . $template . '.' . ltrim($this->config['view_suffix'], '.');
$template = realpath($path . $template . '.' . ltrim($this->config['view_suffix'], '.'));
}
if (is_file($template)) {