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

Function TestStaticCallVar

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

Source from the content-addressed store, hash-verified

248}
249
250func TestStaticCallVar(t *testing.T) {
251 src := `<? Foo::$bar();`
252
253 expected := &node.Root{
254 Position: &position.Position{
255 StartLine: 1,
256 EndLine: 1,
257 StartPos: 3,
258 EndPos: 15,
259 },
260 Stmts: []node.Node{
261 &stmt.Expression{
262 Position: &position.Position{
263 StartLine: 1,
264 EndLine: 1,
265 StartPos: 3,
266 EndPos: 15,
267 },
268 Expr: &expr.StaticCall{
269 Position: &position.Position{
270 StartLine: 1,
271 EndLine: 1,
272 StartPos: 3,
273 EndPos: 14,
274 },
275 Class: &name.Name{
276 Position: &position.Position{
277 StartLine: 1,
278 EndLine: 1,
279 StartPos: 3,
280 EndPos: 6,
281 },
282 Parts: []node.Node{
283 &name.NamePart{
284 Position: &position.Position{
285 StartLine: 1,
286 EndLine: 1,
287 StartPos: 3,
288 EndPos: 6,
289 },
290 Value: "Foo",
291 },
292 },
293 },
294 Call: &expr.Variable{
295 Position: &position.Position{
296 StartLine: 1,
297 EndLine: 1,
298 StartPos: 8,
299 EndPos: 12,
300 },
301 VarName: &node.Identifier{
302 Position: &position.Position{
303 StartLine: 1,
304 EndLine: 1,
305 StartPos: 8,
306 EndPos: 12,
307 },

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…