(t *testing.T)
| 2362 | } |
| 2363 | |
| 2364 | func TestPrinterPrintStaticCall(t *testing.T) { |
| 2365 | o := bytes.NewBufferString("") |
| 2366 | |
| 2367 | p := printer.NewPrinter(o) |
| 2368 | p.Print(&expr.StaticCall{ |
| 2369 | Class: &node.Identifier{Value: "Foo"}, |
| 2370 | Call: &node.Identifier{Value: "bar"}, |
| 2371 | ArgumentList: &node.ArgumentList{ |
| 2372 | Arguments: []node.Node{ |
| 2373 | &node.Argument{ |
| 2374 | Expr: &expr.Variable{ |
| 2375 | VarName: &node.Identifier{Value: "a"}, |
| 2376 | }, |
| 2377 | }, |
| 2378 | &node.Argument{ |
| 2379 | Expr: &expr.Variable{ |
| 2380 | VarName: &node.Identifier{Value: "b"}, |
| 2381 | }, |
| 2382 | }, |
| 2383 | }, |
| 2384 | }, |
| 2385 | }) |
| 2386 | |
| 2387 | expected := `Foo::bar($a,$b)` |
| 2388 | actual := o.String() |
| 2389 | |
| 2390 | if expected != actual { |
| 2391 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2392 | } |
| 2393 | } |
| 2394 | |
| 2395 | func TestPrinterPrintStaticPropertyFetch(t *testing.T) { |
| 2396 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…