From a182be44d5cd9a5e9b484f71d9a1514b74440792 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 31 Jul 2016 18:17:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/thinkphp/library/think/urlTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/thinkphp/library/think/urlTest.php b/tests/thinkphp/library/think/urlTest.php index 60715149..6b33a2b0 100644 --- a/tests/thinkphp/library/think/urlTest.php +++ b/tests/thinkphp/library/think/urlTest.php @@ -70,9 +70,9 @@ class urlTest extends \PHPUnit_Framework_TestCase public function testBuildNameRoute() { - Route::get(['blog', 'blog/:id'], 'index/blog'); + Route::get(['name', 'blog/:id'], 'index/blog'); Config::set('url_html_suffix', 'shtml'); - $this->assertEquals('/blog/10/name/thinkphp.shtml', Url::build('blog?id=10&name=thinkphp')); + $this->assertEquals('/blog/10/name/thinkphp.shtml', Url::build('name?id=10&name=thinkphp')); } public function testBuildAnchor() @@ -101,9 +101,9 @@ class urlTest extends \PHPUnit_Framework_TestCase Config::set('url_domain_deploy', false); Config::set('url_common_param', false); Url::root('/index.php'); - Route::get(['blog', 'blog/:id'], 'index/blog'); + Route::get('blog/:id', 'index/blog'); Config::set('url_html_suffix', 'shtml'); - $this->assertEquals('/index.php/blog/10/name/thinkphp.shtml', Url::build('blog?id=10&name=thinkphp')); + $this->assertEquals('/index.php/blog/10/name/thinkphp.shtml', Url::build('index/blog?id=10&name=thinkphp')); } }