mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-08-30 12:45:32 +08:00
完善单元测试
This commit is contained in:
@@ -26,6 +26,14 @@ class routeTest extends \PHPUnit_Framework_TestCase
|
||||
Route::get('hello/:name', 'index/hello');
|
||||
Route::get(['hello/:name' => 'index/hello']);
|
||||
$this->assertEquals(['type' => 'module', 'module' => [null, 'index', 'hello']], Route::check('hello/thinkphp'));
|
||||
$this->assertEquals(['hello/:name' => ['route' => 'index/hello', 'option' => [], 'pattern' => []]], Route::getRules('GET'));
|
||||
}
|
||||
|
||||
public function testRouteMap()
|
||||
{
|
||||
Route::map('hello', 'index/hello');
|
||||
//$this->assertEquals('index/hello',Route::map('hello'));
|
||||
$this->assertEquals(['type' => 'module', 'module' => ['index', 'hello', null]], Route::check('hello'));
|
||||
}
|
||||
|
||||
public function testParseUrl()
|
||||
|
||||
Reference in New Issue
Block a user