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

Function TestFunctionCall

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

Source from the content-addressed store, hash-verified

20)
21
22func TestFunctionCall(t *testing.T) {
23 src := `<? foo();`
24
25 expected := &node.Root{
26 Position: &position.Position{
27 StartLine: 1,
28 EndLine: 1,
29 StartPos: 3,
30 EndPos: 9,
31 },
32 Stmts: []node.Node{
33 &stmt.Expression{
34 Position: &position.Position{
35 StartLine: 1,
36 EndLine: 1,
37 StartPos: 3,
38 EndPos: 9,
39 },
40 Expr: &expr.FunctionCall{
41 Position: &position.Position{
42 StartLine: 1,
43 EndLine: 1,
44 StartPos: 3,
45 EndPos: 8,
46 },
47 Function: &name.Name{
48 Position: &position.Position{
49 StartLine: 1,
50 EndLine: 1,
51 StartPos: 3,
52 EndPos: 6,
53 },
54 Parts: []node.Node{
55 &name.NamePart{
56 Position: &position.Position{
57 StartLine: 1,
58 EndLine: 1,
59 StartPos: 3,
60 EndPos: 6,
61 },
62 Value: "foo",
63 },
64 },
65 },
66 ArgumentList: &node.ArgumentList{
67 Position: &position.Position{
68 StartLine: 1,
69 EndLine: 1,
70 StartPos: 6,
71 EndPos: 8,
72 },
73 },
74 },
75 },
76 },
77 }
78
79 php7parser := php7.NewParser([]byte(src), "7.4")

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…