(t *testing.T)
| 2393 | } |
| 2394 | |
| 2395 | func TestPrinterPrintStaticPropertyFetch(t *testing.T) { |
| 2396 | o := bytes.NewBufferString("") |
| 2397 | |
| 2398 | p := printer.NewPrinter(o) |
| 2399 | p.Print(&expr.StaticPropertyFetch{ |
| 2400 | Class: &node.Identifier{Value: "Foo"}, |
| 2401 | Property: &expr.Variable{ |
| 2402 | VarName: &node.Identifier{Value: "bar"}, |
| 2403 | }, |
| 2404 | }) |
| 2405 | |
| 2406 | expected := `Foo::$bar` |
| 2407 | actual := o.String() |
| 2408 | |
| 2409 | if expected != actual { |
| 2410 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2411 | } |
| 2412 | } |
| 2413 | |
| 2414 | func TestPrinterPrintTernary(t *testing.T) { |
| 2415 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…