(t *testing.T)
| 1641 | } |
| 1642 | |
| 1643 | func TestPrinterPrintExprClassConstFetch(t *testing.T) { |
| 1644 | o := bytes.NewBufferString("") |
| 1645 | |
| 1646 | p := printer.NewPrinter(o) |
| 1647 | p.Print(&expr.ClassConstFetch{ |
| 1648 | Class: &expr.Variable{ |
| 1649 | VarName: &node.Identifier{Value: "var"}, |
| 1650 | }, |
| 1651 | ConstantName: &node.Identifier{ |
| 1652 | Value: "CONST", |
| 1653 | }, |
| 1654 | }) |
| 1655 | |
| 1656 | expected := `$var::CONST` |
| 1657 | actual := o.String() |
| 1658 | |
| 1659 | if expected != actual { |
| 1660 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1661 | } |
| 1662 | } |
| 1663 | |
| 1664 | func TestPrinterPrintExprClone(t *testing.T) { |
| 1665 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…