diff --git a/library/think/template/taglib/Cx.php b/library/think/template/taglib/Cx.php index 7336db86..6b27ea82 100644 --- a/library/think/template/taglib/Cx.php +++ b/library/think/template/taglib/Cx.php @@ -620,9 +620,9 @@ class Cx extends Taglib return $parseStr; } - /** + /** * U函数的tag标签 - * 格式: + * 格式:{url link="模块/控制器/方法" vars="参数" suffix="true或者false 是否带有后缀" domain="true或者false 是否携带域名" /} * @access public * @param array $tag 标签属性 * @param string $content 标签内容 diff --git a/tests/thinkphp/library/think/template/taglib/cxTest.php b/tests/thinkphp/library/think/template/taglib/cxTest.php index 5e239cbe..a77824b6 100644 --- a/tests/thinkphp/library/think/template/taglib/cxTest.php +++ b/tests/thinkphp/library/think/template/taglib/cxTest.php @@ -535,7 +535,16 @@ EOF; $template->display($content); $this->expectOutputString('123456789'); } - + public function testUrl() + { + $template = new template(); + $content = <<display($content); + $this->expectOutputString(\think\Url::build('Index/index')); + } + public function testFunction() { $template = new template();