@@ -32,21 +32,21 @@ public function testBuild(array $query, string $expected): void
32
32
33
33
public function queryStringProvider ()
34
34
{
35
- //Indexed array.
36
- yield [
37
- [ 'iids ' => [88 , 86 ] ],
38
- //iids[]=88&iids[]=86
35
+ yield ' indexed array' => [
36
+ [
37
+ 'iids ' => [88 , 86 ],
38
+ ],
39
39
'iids%5B%5D=88&iids%5B%5D=86 ' ,
40
40
];
41
41
42
- //Non indexed array with only numeric keys.
43
- yield [
44
- [ 'iids ' => [0 => 88 , 2 => 86 ] ],
45
- //iids[0]=88&iids[2]=86
42
+ yield ' non- indexed array with only numeric keys' => [
43
+ [
44
+ 'iids ' => [0 => 88 , 2 => 86 ],
45
+ ],
46
46
'iids%5B0%5D=88&iids%5B2%5D=86 ' ,
47
47
];
48
48
49
- yield [
49
+ yield ' indexed array with multiple entries ' => [
50
50
[
51
51
'source_branch ' => 'test_source ' ,
52
52
'target_branch ' => 'test_master ' ,
@@ -55,14 +55,15 @@ public function queryStringProvider()
55
55
'source_branch=test_source&target_branch=test_master&title=test ' ,
56
56
];
57
57
58
- //Boolean encoding
59
- yield [
60
- ['push_events ' => false , 'merge_requests_events ' => 1 ],
58
+ yield 'boolean encoding with multiple entries ' => [
59
+ [
60
+ 'push_events ' => false ,
61
+ 'merge_requests_events ' => 1 ,
62
+ ],
61
63
'push_events=0&merge_requests_events=1 ' ,
62
64
];
63
65
64
- //A deeply nested array.
65
- yield [
66
+ yield 'deeply nested array ' => [
66
67
[
67
68
'search ' => 'a project ' ,
68
69
'owned ' => 'true ' ,
@@ -90,13 +91,6 @@ public function queryStringProvider()
90
91
],
91
92
],
92
93
],
93
- //search=a project
94
- //&owned=true
95
- //&iids[]=88&iids[]=86
96
- //&assoc[a]=b&assoc[c][d]=e&assoc[c][f]=g
97
- //&nested[a][][b]=c&nested[a][][d]=e
98
- //&nested[a][][f][g]=h&nested[a][][f][i]=j
99
- //&nested[a][][f][k][]=87&nested[a][][f][k][]=89
100
94
'search=a%20project&owned=true&iids%5B%5D=88&iids%5B%5D=86 ' .
101
95
'&assoc%5Ba%5D=b&assoc%5Bc%5D%5Bd%5D=e&assoc%5Bc%5D%5Bf%5D=g ' .
102
96
'&nested%5Ba%5D%5B%5D%5Bb%5D=c&nested%5Ba%5D%5B%5D%5Bd%5D=e ' .
0 commit comments