Skip to content

Commit

Permalink
Added test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
aran112000 authored and otsch committed Apr 12, 2023
1 parent 85df4db commit 79ef707
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/SanitizeArraysTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

use Crwlr\QueryString\Query;

test('Duplicate query string keys are correctly converted to arrays', function () {
expect(Query::fromString('test=1&test2=2&test=2&test[]=3')->toArray())
->toEqual([
'test' => [1, 2, 3],
'test2' => 2,
]);
});

0 comments on commit 79ef707

Please sign in to comment.