(t *testing.T)
| 220 | } |
| 221 | |
| 222 | func TestArrayItemUnpack(t *testing.T) { |
| 223 | src := `<? array(...$b);` |
| 224 | |
| 225 | expected := &node.Root{ |
| 226 | Position: &position.Position{ |
| 227 | StartLine: 1, |
| 228 | EndLine: 1, |
| 229 | StartPos: 3, |
| 230 | EndPos: 16, |
| 231 | }, |
| 232 | Stmts: []node.Node{ |
| 233 | &stmt.Expression{ |
| 234 | Position: &position.Position{ |
| 235 | StartLine: 1, |
| 236 | EndLine: 1, |
| 237 | StartPos: 3, |
| 238 | EndPos: 16, |
| 239 | }, |
| 240 | Expr: &expr.Array{ |
| 241 | Position: &position.Position{ |
| 242 | StartLine: 1, |
| 243 | EndLine: 1, |
| 244 | StartPos: 3, |
| 245 | EndPos: 15, |
| 246 | }, |
| 247 | Items: []node.Node{ |
| 248 | &expr.ArrayItem{ |
| 249 | Position: &position.Position{ |
| 250 | StartLine: 1, |
| 251 | EndLine: 1, |
| 252 | StartPos: 9, |
| 253 | EndPos: 14, |
| 254 | }, |
| 255 | Unpack: true, |
| 256 | Val: &expr.Variable{ |
| 257 | Position: &position.Position{ |
| 258 | StartLine: 1, |
| 259 | EndLine: 1, |
| 260 | StartPos: 12, |
| 261 | EndPos: 14, |
| 262 | }, |
| 263 | VarName: &node.Identifier{ |
| 264 | Position: &position.Position{ |
| 265 | StartLine: 1, |
| 266 | EndLine: 1, |
| 267 | StartPos: 12, |
| 268 | EndPos: 14, |
| 269 | }, |
| 270 | Value: "b", |
| 271 | }, |
| 272 | }, |
| 273 | }, |
| 274 | }, |
| 275 | }, |
| 276 | }, |
| 277 | }, |
| 278 | } |
| 279 |
nothing calls this directly
no test coverage detected
searching dependent graphs…