-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathRestrictedFunctionsUnitTest.php
126 lines (121 loc) · 1.95 KB
/
RestrictedFunctionsUnitTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
/**
* Unit test class for WordPressVIPMinimum Coding Standard.
*
* @package VIPCS\WordPressVIPMinimum
*/
namespace WordPressVIPMinimum\Tests\Functions;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the RestrictedFunctions sniff.
*
* @covers \WordPressVIPMinimum\Sniffs\Functions\RestrictedFunctionsSniff
*/
class RestrictedFunctionsUnitTest extends AbstractSniffUnitTest {
/**
* Returns the lines where errors should occur.
*
* @return array<int, int> Key is the line number, value is the number of expected errors.
*/
public function getErrorList() {
return [
27 => 1,
28 => 1,
29 => 1,
30 => 1,
31 => 1,
32 => 1,
33 => 1,
34 => 1,
40 => 1,
43 => 1,
46 => 1,
50 => 1,
62 => 1,
75 => 1,
76 => 1,
91 => 1,
94 => 1,
97 => 1,
98 => 1,
99 => 1,
100 => 1,
101 => 1,
104 => 1,
107 => 1,
125 => 1,
141 => 1,
142 => 1,
143 => 1,
144 => 1,
145 => 1,
146 => 1,
147 => 1,
148 => 1,
149 => 1,
150 => 1,
151 => 1,
152 => 1,
153 => 1,
154 => 1,
155 => 1,
156 => 1,
157 => 1,
158 => 1,
159 => 1,
160 => 1,
161 => 1,
162 => 1,
163 => 1,
164 => 1,
165 => 1,
166 => 1,
168 => 1,
174 => 1,
175 => 1,
177 => 1,
183 => 1,
184 => 1,
185 => 1,
186 => 1,
187 => 1,
188 => 1,
189 => 1,
190 => 1,
191 => 1,
192 => 1,
193 => 1,
194 => 1,
195 => 1,
196 => 1,
197 => 1,
198 => 1,
199 => 1,
200 => 1,
228 => 1,
];
}
/**
* Returns the lines where warnings should occur.
*
* @return array<int, int> Key is the line number, value is the number of expected warnings.
*/
public function getWarningList() {
return [
56 => 1,
110 => 1,
111 => 1,
114 => 1,
118 => 1,
119 => 1,
122 => 1,
130 => 1,
131 => 1,
132 => 1,
137 => 1,
138 => 1,
139 => 1,
208 => 1,
];
}
}