This commit is contained in:
thinkphp
2016-05-10 12:04:59 +08:00
parent 6cec513b10
commit a6d29fedc9

View File

@@ -34,7 +34,7 @@ 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');
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'));
}