Skip to content

Commit 055c2d2

Browse files
committed
update tests
1 parent 3db034c commit 055c2d2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

build/tests/php/FileGenerator/Domain/ApiSearchGeneratorTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ public function test_generate_search_index_one_item(): void
2929

3030
$expected = [
3131
[
32+
'id' => 'api_table?',
3233
'fnName' => 'table?',
3334
'fnSignature' => '(table? x)',
3435
'desc' => 'doc for table?',
3536
'anchor' => 'table',
37+
'type' => 'api',
3638
],
3739
];
3840

@@ -63,16 +65,20 @@ public function test_multiple_items_in_different_groups(): void
6365

6466
$expected = [
6567
[
68+
'id' => 'api_table',
6669
'fnName' => 'table',
6770
'fnSignature' => '(table & xs)',
6871
'desc' => 'doc for table',
6972
'anchor' => 'table',
73+
'type' => 'api',
7074
],
7175
[
76+
'id' => 'api_not',
7277
'fnName' => 'not',
7378
'fnSignature' => '(not x)',
7479
'desc' => 'doc for not',
7580
'anchor' => 'not',
81+
'type' => 'api',
7682
],
7783
];
7884

@@ -103,16 +109,20 @@ public function test_multiple_items_in_the_same_group(): void
103109

104110
$expected = [
105111
[
112+
'id' => 'api_table',
106113
'fnName' => 'table',
107114
'fnSignature' => '(table & xs)',
108115
'desc' => 'doc for table',
109116
'anchor' => 'table',
117+
'type' => 'api',
110118
],
111119
[
120+
'id' => 'api_table?',
112121
'fnName' => 'table?',
113122
'fnSignature' => '(table? x)',
114123
'desc' => 'doc for table?',
115124
'anchor' => 'table-1',
125+
'type' => 'api',
116126
],
117127
];
118128

@@ -143,16 +153,20 @@ public function test_fn_name_with_slash_in_the_middle(): void
143153

144154
$expected = [
145155
[
156+
'id' => 'api_http/response',
146157
'fnName' => 'http/response',
147158
'fnSignature' => '',
148159
'desc' => '',
149160
'anchor' => 'http-response',
161+
'type' => 'api',
150162
],
151163
[
164+
'id' => 'api_http/response?',
152165
'fnName' => 'http/response?',
153166
'fnSignature' => '',
154167
'desc' => '',
155168
'anchor' => 'http-response-1',
169+
'type' => 'api',
156170
],
157171
];
158172

@@ -183,16 +197,20 @@ public function test_fn_name_ending_with_minus(): void
183197

184198
$expected = [
185199
[
200+
'id' => 'api_defn',
186201
'fnName' => 'defn',
187202
'fnSignature' => '',
188203
'desc' => '',
189204
'anchor' => 'defn',
205+
'type' => 'api',
190206
],
191207
[
208+
'id' => 'api_defn-',
192209
'fnName' => 'defn-',
193210
'fnSignature' => '',
194211
'desc' => '',
195212
'anchor' => 'defn-1',
213+
'type' => 'api',
196214
],
197215
];
198216

@@ -223,16 +241,20 @@ public function test_fn_name_with_upper_case(): void
223241

224242
$expected = [
225243
[
244+
'id' => 'api_NAN',
226245
'fnName' => 'NAN',
227246
'fnSignature' => '',
228247
'desc' => '',
229248
'anchor' => 'nan',
249+
'type' => 'api',
230250
],
231251
[
252+
'id' => 'api_nan?',
232253
'fnName' => 'nan?',
233254
'fnSignature' => '',
234255
'desc' => '',
235256
'anchor' => 'nan-1',
257+
'type' => 'api',
236258
],
237259
];
238260

0 commit comments

Comments
 (0)