Skip to content

Commit da1c358

Browse files
committed
up
1 parent f692436 commit da1c358

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

test/unit/RouteTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ public function testNotSupportedMethod()
119119
$response = $this->mockServer->request(MockRequest::GET, '/testRoute/method');
120120
$response->assertContainContent('Route not found');
121121
}
122-
}
122+
}

test/unit/Router/RouterTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,15 @@ public function testParamRoute(): void
214214
// invalid
215215
[$status, ,] = $router->match('/hi/dont-match');
216216
$this->assertSame(Router::NOT_FOUND, $status);
217+
218+
// '/user/upload/moment/orj/{name}'
219+
$router->get('/user/upload/moment/orj/{name}', 'handler4');
220+
221+
[$status, $path, $route] = $router->match('/user/upload/moment/orj/da');
222+
223+
$this->assertSame(Router::FOUND, $status);
224+
$this->assertSame('/user/upload/moment/orj/da', $path);
225+
$this->assertSame('/user/upload/moment/orj/{name}', $route->getPath());
217226
}
218227

219228
public function testComplexRoute(): void

0 commit comments

Comments
 (0)