summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Pest.php1
-rw-r--r--tests/Unit/RouteTest.php16
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/Pest.php b/tests/Pest.php
new file mode 100644
index 0000000..b3d9bbc
--- /dev/null
+++ b/tests/Pest.php
@@ -0,0 +1 @@
+<?php
diff --git a/tests/Unit/RouteTest.php b/tests/Unit/RouteTest.php
new file mode 100644
index 0000000..5e3dc3b
--- /dev/null
+++ b/tests/Unit/RouteTest.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+use Lightscale\Router\Enums\HttpMethod;
+use Lightscale\Router\Enums\SpecialSegment;
+use Lightscale\Router\PathSegment;
+use Lightscale\Router\Route;
+
+it('initializes')
+ ->expect(fn () => new Route(
+ new PathSegment(SpecialSegment::Root),
+ HttpMethod::Get,
+ fn () => null
+ ))
+ ->toBeInstance(Route::class);