(t *testing.T)
| 2181 | } |
| 2182 | |
| 2183 | func TestPrinterPrintPrint(t *testing.T) { |
| 2184 | o := bytes.NewBufferString("") |
| 2185 | |
| 2186 | p := printer.NewPrinter(o) |
| 2187 | p.Print(&expr.Print{ |
| 2188 | Expr: &expr.Variable{ |
| 2189 | VarName: &node.Identifier{Value: "var"}, |
| 2190 | }, |
| 2191 | }) |
| 2192 | |
| 2193 | expected := `print $var` |
| 2194 | actual := o.String() |
| 2195 | |
| 2196 | if expected != actual { |
| 2197 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2198 | } |
| 2199 | } |
| 2200 | |
| 2201 | func TestPrinterPrintPropertyFetch(t *testing.T) { |
| 2202 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…