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'));