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

Function TestFunctionCallExprArg

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

Source from the content-addressed store, hash-verified

348}
349
350func TestFunctionCallExprArg(t *testing.T) {
351 src := `<? ceil($foo/3);`
352
353 expected := &node.Root{
354 Position: &position.Position{
355 StartLine: 1,
356 EndLine: 1,
357 StartPos: 3,
358 EndPos: 16,
359 },
360 Stmts: []node.Node{
361 &stmt.Expression{
362 Position: &position.Position{
363 StartLine: 1,
364 EndLine: 1,
365 StartPos: 3,
366 EndPos: 16,
367 },
368 Expr: &expr.FunctionCall{
369 Position: &position.Position{
370 StartLine: 1,
371 EndLine: 1,
372 StartPos: 3,
373 EndPos: 15,
374 },
375 Function: &name.Name{
376 Position: &position.Position{
377 StartLine: 1,
378 EndLine: 1,
379 StartPos: 3,
380 EndPos: 7,
381 },
382 Parts: []node.Node{
383 &name.NamePart{
384 Position: &position.Position{
385 StartLine: 1,
386 EndLine: 1,
387 StartPos: 3,
388 EndPos: 7,
389 },
390 Value: "ceil",
391 },
392 },
393 },
394 ArgumentList: &node.ArgumentList{
395 Position: &position.Position{
396 StartLine: 1,
397 EndLine: 1,
398 StartPos: 7,
399 EndPos: 15,
400 },
401 Arguments: []node.Node{
402 &node.Argument{
403 Position: &position.Position{
404 StartLine: 1,
405 EndLine: 1,
406 StartPos: 8,
407 EndPos: 14,

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…