summaryrefslogtreecommitdiff
path: root/tests/Unit/PathSegmentTest.php
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
commite4bb526bfda6aef396b551fb14a09ab9b2cfae53 (patch)
treef7e2aa02b39eaa5a81984109f674394032a7939c /tests/Unit/PathSegmentTest.php
parentf71632bacf15cffc3c1a0f1d4673f04c9e8e3f55 (diff)
case insensitive path matching
Diffstat (limited to 'tests/Unit/PathSegmentTest.php')
-rw-r--r--tests/Unit/PathSegmentTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Unit/PathSegmentTest.php b/tests/Unit/PathSegmentTest.php
index c537c38..29abb8c 100644
--- a/tests/Unit/PathSegmentTest.php
+++ b/tests/Unit/PathSegmentTest.php
@@ -41,6 +41,12 @@ it('gets key for type :dataset', function (PathSegmentType $type, ?string $res)
($t = PathSegmentType::Parameter)->name => [$t, '<parameter>'],
]);
+it('gets raw keys lowercase', function() {
+ $seg = new PathSegment('TesTiNg');
+ expect($seg->getType())->toBe(PathSegmentType::Raw);
+ expect($seg->getKey())->toBe('testing');
+});
+
it('gets type :dataset', function (PathSegmentType $type) {
$seg = new PathSegment($v = 'testing', $type);
expect($seg->getType())->toBe($type);