summaryrefslogtreecommitdiff
path: root/tests/Unit
diff options
context:
space:
mode:
authorSam Light <sam@lightscale.co.uk>2026-06-10 19:00:32 +0100
committerSam Light <sam@lightscale.co.uk>2026-06-10 19:00:32 +0100
commitf71632bacf15cffc3c1a0f1d4673f04c9e8e3f55 (patch)
treef816dbd8867a593c6239dd264b7114ba1c70643f /tests/Unit
parent5028ab476d3e262956cef65147e279b7922bb53d (diff)
added regex matcher to path segment type and test
Diffstat (limited to 'tests/Unit')
-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();