From 28da923d280c7ab404907a17fe47ee22a329f9b2 Mon Sep 17 00:00:00 2001 From: lilwil Date: Thu, 30 Jun 2016 15:15:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=20(#186)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/template/taglib/Cx.php | 4 ++-- .../thinkphp/library/think/template/taglib/cxTest.php | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) 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();