From dda1faaa2ea7f4d5823f23b4323106c40b9c3a75 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 23 Aug 2016 18:49:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/thinkphp/library/think/urlTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/thinkphp/library/think/urlTest.php b/tests/thinkphp/library/think/urlTest.php index e1931010..69f9be76 100644 --- a/tests/thinkphp/library/think/urlTest.php +++ b/tests/thinkphp/library/think/urlTest.php @@ -70,6 +70,7 @@ class urlTest extends \PHPUnit_Framework_TestCase public function testBuildNameRoute() { + Route::rules([]); Route::get(['name', 'blog/:id'], 'index/blog'); $this->assertEquals([['blog/:id', ['id' => 1], null]], Route::name('name')); Config::set('url_html_suffix', 'shtml'); @@ -102,6 +103,7 @@ class urlTest extends \PHPUnit_Framework_TestCase Config::set('url_domain_deploy', false); Config::set('url_common_param', false); Url::root('/index.php'); + Route::rules([]); Route::get('blog/:id', 'index/blog/read'); Config::set('url_html_suffix', 'shtml'); $this->assertEquals('/index.php/blog/10/name/thinkphp.shtml', Url::build('index/blog/read?id=10&name=thinkphp'));