(t *testing.T)
| 3606 | } |
| 3607 | |
| 3608 | func TestPrintStaticVar(t *testing.T) { |
| 3609 | o := bytes.NewBufferString("") |
| 3610 | |
| 3611 | p := printer.NewPrettyPrinter(o, " ") |
| 3612 | p.Print(&stmt.StaticVar{ |
| 3613 | Variable: &expr.Variable{VarName: &node.Identifier{Value: "a"}}, |
| 3614 | Expr: &scalar.Lnumber{Value: "1"}, |
| 3615 | }) |
| 3616 | |
| 3617 | expected := `$a = 1` |
| 3618 | actual := o.String() |
| 3619 | |
| 3620 | if expected != actual { |
| 3621 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 3622 | } |
| 3623 | } |
| 3624 | |
| 3625 | func TestPrintStatic(t *testing.T) { |
| 3626 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…