From fce80eb623202ea9f414860db7cc95d1ed115564 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 11 May 2016 12:55:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/thinkphp/library/think/routeTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/thinkphp/library/think/routeTest.php b/tests/thinkphp/library/think/routeTest.php index cfba2634..eb27b456 100644 --- a/tests/thinkphp/library/think/routeTest.php +++ b/tests/thinkphp/library/think/routeTest.php @@ -95,8 +95,8 @@ class routeTest extends \PHPUnit_Framework_TestCase Route::get('hello/:name', 'index/hello'); Route::get('blog/:id', 'blog/read', [], ['id' => '\d+']); - $this->assertEquals(false, Route::check('test/thinkphp')); - $this->assertEquals(false, Route::check('blog/thinkphp')); + $this->assertEquals(false, Route::check(Request::instance(), 'test/thinkphp')); + $this->assertEquals(false, Route::check(Request::instance(), 'blog/thinkphp')); $this->assertEquals(['type' => 'module', 'module' => [null, 'blog', 'read']], Route::check(Request::instance(), 'blog/5')); $this->assertEquals(['type' => 'module', 'module' => [null, 'index', 'hello']], Route::check(Request::instance(), 'hello/thinkphp/abc/test')); } @@ -105,7 +105,7 @@ class routeTest extends \PHPUnit_Framework_TestCase { Route::pattern(['id' => '\d+', 'name' => '\w{6,25}']); Route::group('group', [':id' => 'index/hello', ':name' => 'index/say']); - $this->assertEquals(false, Route::check('empty/think')); + $this->assertEquals(false, Route::check(Request::instance(), 'empty/think')); $this->assertEquals(['type' => 'module', 'module' => [null, 'index', 'say']], Route::check(Request::instance(), 'group/think')); $this->assertEquals(['type' => 'module', 'module' => [null, 'index', 'hello']], Route::check(Request::instance(), 'group/10')); $this->assertEquals(['type' => 'module', 'module' => [null, 'index', 'say']], Route::check(Request::instance(), 'group/thinkphp')); @@ -115,8 +115,8 @@ class routeTest extends \PHPUnit_Framework_TestCase { Route::get('hello/:name', 'index/hello'); Route::get('blog/:id', 'blog/read', [], ['id' => '\d+']); - $this->assertEquals(false, Route::check('test/thinkphp')); - $this->assertEquals(false, Route::check('blog/thinkphp')); + $this->assertEquals(false, Route::check(Request::instance(), 'test/thinkphp')); + $this->assertEquals(false, Route::check(Request::instance(), 'blog/thinkphp')); $this->assertEquals(['type' => 'module', 'module' => [null, 'index', 'hello']], Route::check(Request::instance(), 'hello/thinkphp')); $this->assertEquals(['type' => 'module', 'module' => [null, 'blog', 'read']], Route::check(Request::instance(), 'blog/5')); }