MCPcopy Create free account
hub / github.com/z7zmey/php-parser / TestFunctionCallVar

Function TestFunctionCallVar

node/expr/t_function_call_test.go:247–348  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

245}
246
247func TestFunctionCallVar(t *testing.T) {
248 src := `<? $foo(yield $a);`
249
250 expected := &node.Root{
251 Position: &position.Position{
252 StartLine: 1,
253 EndLine: 1,
254 StartPos: 3,
255 EndPos: 18,
256 },
257 Stmts: []node.Node{
258 &stmt.Expression{
259 Position: &position.Position{
260 StartLine: 1,
261 EndLine: 1,
262 StartPos: 3,
263 EndPos: 18,
264 },
265 Expr: &expr.FunctionCall{
266 Position: &position.Position{
267 StartLine: 1,
268 EndLine: 1,
269 StartPos: 3,
270 EndPos: 17,
271 },
272 Function: &expr.Variable{
273 Position: &position.Position{
274 StartLine: 1,
275 EndLine: 1,
276 StartPos: 3,
277 EndPos: 7,
278 },
279 VarName: &node.Identifier{
280 Position: &position.Position{
281 StartLine: 1,
282 EndLine: 1,
283 StartPos: 3,
284 EndPos: 7,
285 },
286 Value: "foo",
287 },
288 },
289 ArgumentList: &node.ArgumentList{
290 Position: &position.Position{
291 StartLine: 1,
292 EndLine: 1,
293 StartPos: 7,
294 EndPos: 17,
295 },
296 Arguments: []node.Node{
297 &node.Argument{
298 Position: &position.Position{
299 StartLine: 1,
300 EndLine: 1,
301 StartPos: 8,
302 EndPos: 16,
303 },
304 Variadic: false,

Callers

nothing calls this directly

Calls 4

ParseMethod · 0.95
GetRootNodeMethod · 0.95
NewParserFunction · 0.92
NewParserFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…