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

Function TestInterfaceExtend

node/stmt/t_interface_test.go:61–132  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

59}
60
61func TestInterfaceExtend(t *testing.T) {
62 src := `<? interface Foo extends Bar {}`
63
64 expected := &node.Root{
65 Position: &position.Position{
66 StartLine: 1,
67 EndLine: 1,
68 StartPos: 3,
69 EndPos: 31,
70 },
71 Stmts: []node.Node{
72 &stmt.Interface{
73 Position: &position.Position{
74 StartLine: 1,
75 EndLine: 1,
76 StartPos: 3,
77 EndPos: 31,
78 },
79 PhpDocComment: "",
80 InterfaceName: &node.Identifier{
81 Position: &position.Position{
82 StartLine: 1,
83 EndLine: 1,
84 StartPos: 13,
85 EndPos: 16,
86 },
87 Value: "Foo",
88 },
89 Extends: &stmt.InterfaceExtends{
90 Position: &position.Position{
91 StartLine: 1,
92 EndLine: 1,
93 StartPos: 17,
94 EndPos: 28,
95 },
96 InterfaceNames: []node.Node{
97 &name.Name{
98 Position: &position.Position{
99 StartLine: 1,
100 EndLine: 1,
101 StartPos: 25,
102 EndPos: 28,
103 },
104 Parts: []node.Node{
105 &name.NamePart{
106 Position: &position.Position{
107 StartLine: 1,
108 EndLine: 1,
109 StartPos: 25,
110 EndPos: 28,
111 },
112 Value: "Bar",
113 },
114 },
115 },
116 },
117 },
118 Stmts: []node.Node{},

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…