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

Function TestStaticCall

node/expr/t_static_call_test.go:19–94  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

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

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…