(t *testing.T)
| 1595 | } |
| 1596 | |
| 1597 | func TestPrintIsset(t *testing.T) { |
| 1598 | o := bytes.NewBufferString("") |
| 1599 | |
| 1600 | p := printer.NewPrettyPrinter(o, " ") |
| 1601 | p.Print(&expr.Isset{ |
| 1602 | Variables: []node.Node{ |
| 1603 | &expr.Variable{VarName: &node.Identifier{Value: "a"}}, |
| 1604 | &expr.Variable{VarName: &node.Identifier{Value: "b"}}, |
| 1605 | }, |
| 1606 | }) |
| 1607 | |
| 1608 | expected := `isset($a, $b)` |
| 1609 | actual := o.String() |
| 1610 | |
| 1611 | if expected != actual { |
| 1612 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1613 | } |
| 1614 | } |
| 1615 | |
| 1616 | func TestPrintList(t *testing.T) { |
| 1617 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…