mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-02 13:12:49 +08:00
修正单元测试
This commit is contained in:
@@ -34,9 +34,9 @@ class urlTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals('/hello/10', Url::build('index/hello?id=10'));
|
||||
$this->assertEquals('/hello/10.html', Url::build('index/hello', 'id=10', 'html'));
|
||||
|
||||
Route::get('hello-<name><id?>', 'index/say', [], ['name' => '\w+', 'id' => '\d+']);
|
||||
$this->assertEquals('/hello-thinkphp', Url::build('index/say?name=thinkphp'));
|
||||
$this->assertEquals('/hello-thinkphp2016', Url::build('index/say?name=thinkphp&id=2016'));
|
||||
Route::get('item-<item><id?>', 'good/item', [], ['item' => '\w+', 'id' => '\d+']);
|
||||
$this->assertEquals('/item-thinkphp', Url::build('good/item?item=thinkphp'));
|
||||
$this->assertEquals('/item-thinkphp2016', Url::build('good/item?item=thinkphp&id=2016'));
|
||||
}
|
||||
|
||||
public function testBuildController()
|
||||
|
||||
Reference in New Issue
Block a user