<?php require '../vendor/autoload.php';

use Intellex\Curly\Content\TypeHandlers\URLEncoded;

$cases = [
	[ '', [  ] ],
	[ 'a', [ 'a' => '' ] ],
	[ 'a[]=1&a[]=2', [ 'a' => [ '1', '2' ] ] ],
	[ 'more=čpžčp', [ 'more' => 'čpžčp' ] ],
	[ 'with.dot=to-underline', [ 'with_dot' => 'to-underline' ] ],
	[ '&&', [  ] ],
];

test($cases, function($input) { return (new URLEncoded(null))->parse($input); });
