(t *testing.T)
| 1777 | } |
| 1778 | |
| 1779 | func TestPrintPropertyFetch(t *testing.T) { |
| 1780 | o := bytes.NewBufferString("") |
| 1781 | |
| 1782 | p := printer.NewPrettyPrinter(o, " ") |
| 1783 | p.Print(&expr.PropertyFetch{ |
| 1784 | Variable: &expr.Variable{VarName: &node.Identifier{Value: "foo"}}, |
| 1785 | Property: &node.Identifier{Value: "bar"}, |
| 1786 | }) |
| 1787 | |
| 1788 | expected := `$foo->bar` |
| 1789 | actual := o.String() |
| 1790 | |
| 1791 | if expected != actual { |
| 1792 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1793 | } |
| 1794 | } |
| 1795 | |
| 1796 | func TestPrintExprReference(t *testing.T) { |
| 1797 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…