summaryrefslogtreecommitdiff
path: root/tests/Unit/RouteTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/RouteTest.php')
-rw-r--r--tests/Unit/RouteTest.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/Unit/RouteTest.php b/tests/Unit/RouteTest.php
index 104401b..50513a1 100644
--- a/tests/Unit/RouteTest.php
+++ b/tests/Unit/RouteTest.php
@@ -47,12 +47,10 @@ it('gets method')
))->getMethod())
->toBe(HttpMethod::Get);
-it('can call handler')
- ->expect(fn () => (new Route(
+it('can get handler', function() {
+ $r = new Route(
HttpMethod::Get,
- fn (RequestInterface $req) => $req->getUri()->getPath()
- ))(
- (new Psr17Factory())->createRequest(HttpMethod::Get->value, '/testing')
- )
- )
- ->toBe('/testing');
+ $h = fn (RequestInterface $req) => $req->getUri()->getPath()
+ );
+ expect($r->getHandler())->toBe($h);
+});