From 5e92ac83c9672b024ccdfad4bd0798cb251efc54 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 2 Aug 2016 17:01:51 +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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/thinkphp/library/think/routeTest.php b/tests/thinkphp/library/think/routeTest.php index db3d6995..1f882f29 100644 --- a/tests/thinkphp/library/think/routeTest.php +++ b/tests/thinkphp/library/think/routeTest.php @@ -274,15 +274,13 @@ class routeTest extends \PHPUnit_Framework_TestCase $this->assertEquals('test', $_GET['abc']); $this->assertEquals(1, $_GET['status']); - Route::domain('subdomain.thinkphp.cn', function () {return ['type' => 'module', 'module' => 'sub2'];}); - Route::checkDomain($request, $rules); - $this->assertEquals('sub2', Route::getbind('module')); - Route::domain('subdomain.thinkphp.cn', '\app\index\controller'); + $rules = Route::rules('GET'); Route::checkDomain($request, $rules); $this->assertEquals('\app\index\controller', Route::getbind('namespace')); Route::domain(['subdomain.thinkphp.cn' => '@\app\index\controller\blog']); + $rules = Route::rules('GET'); Route::checkDomain($request, $rules); $this->assertEquals('\app\index\controller\blog', Route::getbind('class'));