(t *testing.T)
| 1339 | } |
| 1340 | |
| 1341 | func TestPrintExprClassConstFetch(t *testing.T) { |
| 1342 | o := bytes.NewBufferString("") |
| 1343 | |
| 1344 | p := printer.NewPrettyPrinter(o, " ") |
| 1345 | p.Print(&expr.ClassConstFetch{ |
| 1346 | Class: &expr.Variable{VarName: &node.Identifier{Value: "var"}}, |
| 1347 | ConstantName: &node.Identifier{Value: "CONST"}, |
| 1348 | }) |
| 1349 | |
| 1350 | expected := `$var::CONST` |
| 1351 | actual := o.String() |
| 1352 | |
| 1353 | if expected != actual { |
| 1354 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1355 | } |
| 1356 | } |
| 1357 | |
| 1358 | func TestPrintExprClone(t *testing.T) { |
| 1359 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…