From f71632bacf15cffc3c1a0f1d4673f04c9e8e3f55 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Wed, 10 Jun 2026 19:00:32 +0100 Subject: added regex matcher to path segment type and test --- tests/Unit/Enums/PathSegmentTypeTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/Unit/Enums/PathSegmentTypeTest.php (limited to 'tests') 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 @@ +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(); -- cgit v1.2.3