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

Function TestInterfaceExtends

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

Source from the content-addressed store, hash-verified

132}
133
134func TestInterfaceExtends(t *testing.T) {
135 src := `<? interface Foo extends Bar, Baz {}`
136
137 expected := &node.Root{
138 Position: &position.Position{
139 StartLine: 1,
140 EndLine: 1,
141 StartPos: 3,
142 EndPos: 36,
143 },
144 Stmts: []node.Node{
145 &stmt.Interface{
146 Position: &position.Position{
147 StartLine: 1,
148 EndLine: 1,
149 StartPos: 3,
150 EndPos: 36,
151 },
152 PhpDocComment: "",
153 InterfaceName: &node.Identifier{
154 Position: &position.Position{
155 StartLine: 1,
156 EndLine: 1,
157 StartPos: 13,
158 EndPos: 16,
159 },
160 Value: "Foo",
161 },
162 Extends: &stmt.InterfaceExtends{
163 Position: &position.Position{
164 StartLine: 1,
165 EndLine: 1,
166 StartPos: 17,
167 EndPos: 33,
168 },
169 InterfaceNames: []node.Node{
170 &name.Name{
171 Position: &position.Position{
172 StartLine: 1,
173 EndLine: 1,
174 StartPos: 25,
175 EndPos: 28,
176 },
177 Parts: []node.Node{
178 &name.NamePart{
179 Position: &position.Position{
180 StartLine: 1,
181 EndLine: 1,
182 StartPos: 25,
183 EndPos: 28,
184 },
185 Value: "Bar",
186 },
187 },
188 },
189 &name.Name{
190 Position: &position.Position{
191 StartLine: 1,

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…