改进单元测试

This commit is contained in:
thinkphp
2016-08-23 18:35:41 +08:00
parent 24a5ed1cb9
commit cf5386de70
2 changed files with 5 additions and 2 deletions

View File

@@ -236,6 +236,9 @@ class Url
{
foreach ($rule as $item) {
list($url, $pattern, $domain) = $item;
if (empty($pattern)) {
return [$url, $domain];
}
foreach ($pattern as $key => $val) {
if (isset($vars[$key])) {
$url = str_replace(['[:' . $key . ']', '<' . $key . '?>', ':' . $key . '', '<' . $key . '>'], $vars[$key], $url);