Commit dec8b03
committed
PropertyTypeHandlingTest: split data provider
The `PropertyTypeHandlingTest` class tests the setting of property values from the ruleset as well as via inline `// phpcs:set ...` annotations.
As both ways of setting the property value should be supported in the same manner, the tests used one data provider for both tests and the fixtures (`PropertyTypeHandlingTest.xml` ruleset and the `Fixtures/PropertyTypeHandlingInline.inc` file containing the inline annotations) mirrored the exact same test cases.
There is one feature, however, which is only supported when setting properties via the ruleset, not when setting them via inline annotations: array property extending.
Until now, the tests for that were also mirrored in the inline annotation tests, even though the feature isn't supported for inline annotations.
This commit now splits the data provider in two:
* One data provider for the tests which apply for both (= most tests).
* One specifically for extending array properties.
That second data provider will now only be used by the `testTypeHandlingWhenSetViaRuleset()` test method.
This should make it more straight-forward to add additional tests for property extending in the future.
---
In case anyone is wondering: As `phpcs:set` is only supposed to be used in tests, I don't think adding support for the `extend` option to inline properties is necessary.1 parent fa32635 commit dec8b03
File tree
2 files changed
+44
-29
lines changed- tests/Core/Ruleset
- Fixtures
2 files changed
+44
-29
lines changedLines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
32 | | - | |
33 | 29 | | |
34 | 30 | | |
35 | 31 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | 107 | | |
118 | 108 | | |
119 | 109 | | |
| |||
175 | 165 | | |
176 | 166 | | |
177 | 167 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | 168 | | |
187 | 169 | | |
188 | 170 | | |
| |||
195 | 177 | | |
196 | 178 | | |
197 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
198 | 221 | | |
199 | 222 | | |
200 | 223 | | |
| |||
203 | 226 | | |
204 | 227 | | |
205 | 228 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | 229 | | |
211 | 230 | | |
212 | | - | |
| 231 | + | |
213 | 232 | | |
214 | 233 | | |
215 | 234 | | |
| |||
0 commit comments