改进Route类

This commit is contained in:
thinkphp
2016-05-24 17:02:21 +08:00
parent d4ab8576b2
commit e936d7dc7d
2 changed files with 1 additions and 6 deletions

View File

@@ -645,7 +645,7 @@ class Route
$key = array_shift($route);
}
$key = $rule . ($key ? '/' . $key : '');
$key = $rule . ($key ? '/' . ltrim($key, '/') : '');
// 检查规则路由
if (is_array($route)) {
$option1 = $route[1];

View File

@@ -166,11 +166,6 @@ class routeTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(['type' => 'method', 'method' => ['\app\index\controller\blog', 'read'], 'params' => []], Route::check($request, 'read'));
}
public function testSsl()
{
$this->assertEquals(false, Route::isSsl());
}
public function testDomain()
{
$_SERVER['HTTP_HOST'] = 'subdomain.thinkphp.cn';