Skip to content

Commit e0ef19b

Browse files
Tests
1 parent 5e40039 commit e0ef19b

File tree

3 files changed

+63
-46
lines changed

3 files changed

+63
-46
lines changed

tests/Drupal/Commenting/FunctionCommentUnitTest.inc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/**
44
* @file
55
* Some function comment tests.
6+
* phpcs:set Drupal.Commenting.FunctionComment commentProhibitedFunctions[] docblock_is_not_allowed
67
*/
78

89
/**
@@ -976,3 +977,13 @@ function return_some_array(): array {
976977
});
977978
return [];
978979
}
980+
981+
/**
982+
* Don't document this function.
983+
*
984+
* @return bool
985+
* Something.
986+
*/
987+
function docblock_is_not_allowed(): bool {
988+
return TRUE;
989+
}

tests/Drupal/Commenting/FunctionCommentUnitTest.inc.fixed

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/**
44
* @file
55
* Some function comment tests.
6+
* phpcs:set Drupal.Commenting.FunctionComment commentProhibitedFunctions[] docblock_is_not_allowed
67
*/
78

89
/**
@@ -1002,3 +1003,7 @@ function return_some_array(): array {
10021003
});
10031004
return [];
10041005
}
1006+
1007+
function docblock_is_not_allowed(): bool {
1008+
return TRUE;
1009+
}

tests/Drupal/Commenting/FunctionCommentUnitTest.php

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -23,55 +23,56 @@ protected function getErrorList(string $testFile): array
2323
switch ($testFile) {
2424
case 'FunctionCommentUnitTest.inc':
2525
return [
26-
12 => 1,
27-
14 => 1,
28-
33 => 1,
29-
43 => 1,
30-
53 => 1,
31-
62 => 1,
32-
71 => 1,
33-
78 => 1,
34-
87 => 1,
35-
92 => 1,
36-
101 => 1,
37-
113 => 1,
38-
126 => 2,
39-
147 => 1,
40-
148 => 2,
41-
187 => 1,
42-
195 => 1,
43-
205 => 1,
44-
215 => 1,
26+
13 => 1,
27+
15 => 1,
28+
34 => 1,
29+
44 => 1,
30+
54 => 1,
31+
63 => 1,
32+
72 => 1,
33+
79 => 1,
34+
88 => 1,
35+
93 => 1,
36+
102 => 1,
37+
114 => 1,
38+
127 => 2,
39+
148 => 1,
40+
149 => 2,
41+
188 => 1,
42+
196 => 1,
43+
206 => 1,
4544
216 => 1,
46-
225 => 3,
47-
233 => 1,
48-
235 => 1,
49-
237 => 1,
50-
248 => 1,
51-
250 => 1,
52-
252 => 1,
53-
254 => 1,
54-
256 => 1,
55-
298 => 1,
56-
308 => 1,
57-
311 => 1,
58-
321 => 1,
59-
324 => 1,
60-
334 => 1,
61-
345 => 1,
62-
357 => 1,
63-
360 => 1,
64-
371 => 1,
65-
389 => 2,
45+
217 => 1,
46+
226 => 3,
47+
234 => 1,
48+
236 => 1,
49+
238 => 1,
50+
249 => 1,
51+
251 => 1,
52+
253 => 1,
53+
255 => 1,
54+
257 => 1,
55+
299 => 1,
56+
309 => 1,
57+
312 => 1,
58+
322 => 1,
59+
325 => 1,
60+
335 => 1,
61+
346 => 1,
62+
358 => 1,
63+
361 => 1,
64+
372 => 1,
6665
390 => 2,
67-
401 => 1,
68-
414 => 1,
69-
416 => 1,
70-
426 => 2,
66+
391 => 2,
67+
402 => 1,
68+
415 => 1,
69+
417 => 1,
7170
427 => 2,
72-
538 => 1,
73-
540 => 1,
74-
941 => 1,
71+
428 => 2,
72+
539 => 1,
73+
541 => 1,
74+
942 => 1,
75+
987 => 1,
7576
];
7677
case 'FunctionCommentUnitTest.1.inc':
7778
return [];

0 commit comments

Comments
 (0)