File tree Expand file tree Collapse file tree 3 files changed +60
-52
lines changed
src/Standards/Squiz/Tests/PHP Expand file tree Collapse file tree 3 files changed +60
-52
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -26,61 +26,69 @@ final class EmbeddedPhpUnitTest extends AbstractSniffUnitTest
2626 * The key of the array should represent the line number and the value
2727 * should represent the number of errors that should occur on that line.
2828 *
29+ * @param string $testFile The name of the file being tested.
30+ *
2931 * @return array<int, int>
3032 */
31- public function getErrorList ()
33+ public function getErrorList ($ testFile = '' )
3234 {
33- return [
34- 7 => 1 ,
35- 12 => 1 ,
36- 18 => 1 ,
37- 19 => 2 ,
38- 20 => 1 ,
39- 21 => 1 ,
40- 22 => 3 ,
41- 24 => 1 ,
42- 26 => 1 ,
43- 29 => 1 ,
44- 30 => 1 ,
45- 31 => 1 ,
46- 34 => 1 ,
47- 36 => 1 ,
48- 40 => 1 ,
49- 41 => 1 ,
50- 44 => 1 ,
51- 45 => 1 ,
52- 49 => 1 ,
53- 59 => 1 ,
54- 63 => 1 ,
55- 93 => 1 ,
56- 94 => 2 ,
57- 100 => 1 ,
58- 102 => 1 ,
59- 112 => 1 ,
60- 113 => 1 ,
61- 116 => 1 ,
62- 117 => 1 ,
63- 120 => 1 ,
64- 121 => 1 ,
65- 128 => 1 ,
66- 129 => 1 ,
67- 132 => 1 ,
68- 134 => 1 ,
69- 136 => 1 ,
70- 138 => 1 ,
71- 142 => 1 ,
72- 145 => 1 ,
73- 151 => 1 ,
74- 158 => 1 ,
75- 165 => 1 ,
76- 169 => 1 ,
77- 175 => 1 ,
78- 176 => 2 ,
79- 178 => 1 ,
80- 179 => 1 ,
81- 180 => 2 ,
82- 181 => 1 ,
83- ];
35+ switch ($ testFile ) {
36+ case 'EmbeddedPhpUnitTest.1.inc ' :
37+ return [
38+ 7 => 1 ,
39+ 12 => 1 ,
40+ 18 => 1 ,
41+ 19 => 2 ,
42+ 20 => 1 ,
43+ 21 => 1 ,
44+ 22 => 3 ,
45+ 24 => 1 ,
46+ 26 => 1 ,
47+ 29 => 1 ,
48+ 30 => 1 ,
49+ 31 => 1 ,
50+ 34 => 1 ,
51+ 36 => 1 ,
52+ 40 => 1 ,
53+ 41 => 1 ,
54+ 44 => 1 ,
55+ 45 => 1 ,
56+ 49 => 1 ,
57+ 59 => 1 ,
58+ 63 => 1 ,
59+ 93 => 1 ,
60+ 94 => 2 ,
61+ 100 => 1 ,
62+ 102 => 1 ,
63+ 112 => 1 ,
64+ 113 => 1 ,
65+ 116 => 1 ,
66+ 117 => 1 ,
67+ 120 => 1 ,
68+ 121 => 1 ,
69+ 128 => 1 ,
70+ 129 => 1 ,
71+ 132 => 1 ,
72+ 134 => 1 ,
73+ 136 => 1 ,
74+ 138 => 1 ,
75+ 142 => 1 ,
76+ 145 => 1 ,
77+ 151 => 1 ,
78+ 158 => 1 ,
79+ 165 => 1 ,
80+ 169 => 1 ,
81+ 175 => 1 ,
82+ 176 => 2 ,
83+ 178 => 1 ,
84+ 179 => 1 ,
85+ 180 => 2 ,
86+ 181 => 1 ,
87+ ];
88+
89+ default :
90+ return [];
91+ }//end switch
8492
8593 }//end getErrorList()
8694
You can’t perform that action at this time.
0 commit comments