(t *testing.T)
| 215 | } |
| 216 | |
| 217 | func TestClosureUse2(t *testing.T) { |
| 218 | src := `<? function($a, $b) use (&$c, $d) {};` |
| 219 | |
| 220 | expected := &node.Root{ |
| 221 | Position: &position.Position{ |
| 222 | StartLine: 1, |
| 223 | EndLine: 1, |
| 224 | StartPos: 3, |
| 225 | EndPos: 37, |
| 226 | }, |
| 227 | Stmts: []node.Node{ |
| 228 | &stmt.Expression{ |
| 229 | Position: &position.Position{ |
| 230 | StartLine: 1, |
| 231 | EndLine: 1, |
| 232 | StartPos: 3, |
| 233 | EndPos: 37, |
| 234 | }, |
| 235 | Expr: &expr.Closure{ |
| 236 | Position: &position.Position{ |
| 237 | StartLine: 1, |
| 238 | EndLine: 1, |
| 239 | StartPos: 3, |
| 240 | EndPos: 36, |
| 241 | }, |
| 242 | ReturnsRef: false, |
| 243 | Static: false, |
| 244 | PhpDocComment: "", |
| 245 | Params: []node.Node{ |
| 246 | &node.Parameter{ |
| 247 | Position: &position.Position{ |
| 248 | StartLine: 1, |
| 249 | EndLine: 1, |
| 250 | StartPos: 12, |
| 251 | EndPos: 14, |
| 252 | }, |
| 253 | ByRef: false, |
| 254 | Variadic: false, |
| 255 | Variable: &expr.Variable{ |
| 256 | Position: &position.Position{ |
| 257 | StartLine: 1, |
| 258 | EndLine: 1, |
| 259 | StartPos: 12, |
| 260 | EndPos: 14, |
| 261 | }, |
| 262 | VarName: &node.Identifier{ |
| 263 | Position: &position.Position{ |
| 264 | StartLine: 1, |
| 265 | EndLine: 1, |
| 266 | StartPos: 12, |
| 267 | EndPos: 14, |
| 268 | }, |
| 269 | Value: "a", |
| 270 | }, |
| 271 | }, |
| 272 | }, |
| 273 | &node.Parameter{ |
| 274 | Position: &position.Position{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…