(t *testing.T)
| 2199 | } |
| 2200 | |
| 2201 | func TestPrinterPrintPropertyFetch(t *testing.T) { |
| 2202 | o := bytes.NewBufferString("") |
| 2203 | |
| 2204 | p := printer.NewPrinter(o) |
| 2205 | p.Print(&expr.PropertyFetch{ |
| 2206 | Variable: &expr.Variable{ |
| 2207 | VarName: &node.Identifier{Value: "foo"}, |
| 2208 | }, |
| 2209 | Property: &node.Identifier{Value: "bar"}, |
| 2210 | }) |
| 2211 | |
| 2212 | expected := `$foo->bar` |
| 2213 | actual := o.String() |
| 2214 | |
| 2215 | if expected != actual { |
| 2216 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2217 | } |
| 2218 | } |
| 2219 | |
| 2220 | func TestPrinterPrintExprReference(t *testing.T) { |
| 2221 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…