diff options
Diffstat (limited to 'tests/Unit/RouteMatchTest.php')
| -rw-r--r-- | tests/Unit/RouteMatchTest.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/Unit/RouteMatchTest.php b/tests/Unit/RouteMatchTest.php new file mode 100644 index 0000000..e3b8bce --- /dev/null +++ b/tests/Unit/RouteMatchTest.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +use Lightscale\Router\Enums\HttpMethod; +use Lightscale\Router\PathSegment; +use Lightscale\Router\PathSegmentMatch; +use Lightscale\Router\Route; +use Lightscale\Router\RouteMatch; + +it('initializes with data', function () { + $v = new RouteMatch( + $segMatch = new PathSegmentMatch( + new PathSegment('test'), + [] + ), + $route = new Route( + HttpMethod::Get, + fn () => null, + ), + ); + + expect($v) + ->segmentMatch->toBe($segMatch) + ->route->toBe($route); +}); |
