增加单元测试 (#186)

This commit is contained in:
lilwil
2016-06-30 15:15:51 +08:00
committed by 云无心
parent 1ef3f04d12
commit 28da923d28
2 changed files with 12 additions and 3 deletions

View File

@@ -620,9 +620,9 @@ class Cx extends Taglib
return $parseStr; return $parseStr;
} }
/** /**
* U函数的tag标签 * U函数的tag标签
* 格式:<url link="模块/控制器/方法" vars="参数" suffix="true或者false 是否带有后缀" domain="true或者false 是否携带域名" /> * 格式:{url link="模块/控制器/方法" vars="参数" suffix="true或者false 是否带有后缀" domain="true或者false 是否携带域名" /}
* @access public * @access public
* @param array $tag 标签属性 * @param array $tag 标签属性
* @param string $content 标签内容 * @param string $content 标签内容

View File

@@ -535,6 +535,15 @@ EOF;
$template->display($content); $template->display($content);
$this->expectOutputString('123456789'); $this->expectOutputString('123456789');
} }
public function testUrl()
{
$template = new template();
$content = <<<EOF
{url link="Index/index" /}
EOF;
$template->display($content);
$this->expectOutputString(\think\Url::build('Index/index'));
}
public function testFunction() public function testFunction()
{ {