summaryrefslogtreecommitdiff
path: root/tests/Unit/Enums/PathSegmentTypeTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Enums/PathSegmentTypeTest.php')
-rw-r--r--tests/Unit/Enums/PathSegmentTypeTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/Unit/Enums/PathSegmentTypeTest.php b/tests/Unit/Enums/PathSegmentTypeTest.php
new file mode 100644
index 0000000..f2fda0a
--- /dev/null
+++ b/tests/Unit/Enums/PathSegmentTypeTest.php
@@ -0,0 +1,17 @@
+<?php
+
+declare(strict_types=1);
+
+use Lightscale\Router\Enums\PathSegmentType;
+
+it('has no routeMatchRegex for Raw')
+ ->expect(fn () => PathSegmentType::Raw->routeMatchRegex())
+ ->toBeNull();
+
+it('has no routeMatchRegex for Root')
+ ->expect(fn () => PathSegmentType::Root->routeMatchRegex())
+ ->toBeNull();
+
+it('has routeMatchRegex for Parameter')
+ ->expect(fn () => PathSegmentType::Parameter->routeMatchRegex())
+ ->toBeString();