Skip to content

Commit 2a5815a

Browse files
committed
Add another test without whitespaces surrounding the parameter to test the condition on OptionAutoloadSniff.php:247 correctly
1 parent 4c7b209 commit 2a5815a

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

WordPress/Tests/WP/OptionAutoloadUnitTest.1.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ $ignored = wp_set_option_autoload_values(
8484
* These are ignored because the option names and the autoload values can't be reliably determined
8585
* or the `$options` parameter is empty.
8686
*/
87+
$ignored = wp_set_option_autoload_values($options);
8788
$ignored = wp_set_option_autoload_values( $options );
8889
$ignored = wp_set_option_autoload_values( options: $options );
8990
$ignored = wp_set_option_autoload_values(array());

WordPress/Tests/WP/OptionAutoloadUnitTest.1.inc.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ $ignored = wp_set_option_autoload_values(
8484
* These are ignored because the option names and the autoload values can't be reliably determined
8585
* or the `$options` parameter is empty.
8686
*/
87+
$ignored = wp_set_option_autoload_values($options);
8788
$ignored = wp_set_option_autoload_values( $options );
8889
$ignored = wp_set_option_autoload_values( options: $options );
8990
$ignored = wp_set_option_autoload_values(array());

WordPress/Tests/WP/OptionAutoloadUnitTest.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@ public function getWarningList( $testFile = '' ) {
4040
switch ( $testFile ) {
4141
case 'OptionAutoloadUnitTest.1.inc':
4242
return array(
43-
106 => 1,
4443
107 => 1,
4544
108 => 1,
4645
109 => 1,
4746
110 => 1,
48-
115 => 1,
49-
117 => 1,
47+
111 => 1,
48+
116 => 1,
5049
118 => 1,
5150
119 => 1,
5251
120 => 1,
@@ -59,8 +58,8 @@ public function getWarningList( $testFile = '' ) {
5958
127 => 1,
6059
128 => 1,
6160
129 => 1,
62-
133 => 1,
63-
135 => 1,
61+
130 => 1,
62+
134 => 1,
6463
136 => 1,
6564
137 => 1,
6665
138 => 1,
@@ -69,7 +68,7 @@ public function getWarningList( $testFile = '' ) {
6968
141 => 1,
7069
142 => 1,
7170
143 => 1,
72-
147 => 1,
71+
144 => 1,
7372
148 => 1,
7473
149 => 1,
7574
150 => 1,
@@ -81,40 +80,41 @@ public function getWarningList( $testFile = '' ) {
8180
156 => 1,
8281
157 => 1,
8382
158 => 1,
84-
163 => 1,
83+
159 => 1,
8584
164 => 1,
8685
165 => 1,
8786
166 => 1,
8887
167 => 1,
8988
168 => 1,
90-
173 => 1,
89+
169 => 1,
9190
174 => 1,
9291
175 => 1,
9392
176 => 1,
9493
177 => 1,
9594
178 => 1,
9695
179 => 1,
97-
185 => 1,
98-
192 => 1,
99-
194 => 1,
96+
180 => 1,
97+
186 => 1,
98+
193 => 1,
10099
195 => 1,
101100
196 => 1,
102101
197 => 1,
103102
198 => 1,
104103
199 => 1,
105104
200 => 1,
106-
202 => 1,
105+
201 => 1,
107106
203 => 1,
108107
204 => 1,
109108
205 => 1,
110-
208 => 1,
109+
206 => 1,
111110
209 => 1,
112111
210 => 1,
113112
211 => 1,
114-
216 => 1,
115-
222 => 1,
116-
224 => 1,
117-
227 => 1,
113+
212 => 1,
114+
217 => 1,
115+
223 => 1,
116+
225 => 1,
117+
228 => 1,
118118
);
119119

120120
case 'OptionAutoloadUnitTest.3.inc':

0 commit comments

Comments
 (0)