Skip to content

Commit 79ef707

Browse files
aran112000otsch
authored andcommitted
Added test coverage
1 parent 85df4db commit 79ef707

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/SanitizeArraysTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
use Crwlr\QueryString\Query;
4+
5+
test('Duplicate query string keys are correctly converted to arrays', function () {
6+
expect(Query::fromString('test=1&test2=2&test=2&test[]=3')->toArray())
7+
->toEqual([
8+
'test' => [1, 2, 3],
9+
'test2' => 2,
10+
]);
11+
});

0 commit comments

Comments
 (0)