(t *testing.T)
| 1979 | } |
| 1980 | |
| 1981 | func TestPrinterPrintIsset(t *testing.T) { |
| 1982 | o := bytes.NewBufferString("") |
| 1983 | |
| 1984 | p := printer.NewPrinter(o) |
| 1985 | p.Print(&expr.Isset{ |
| 1986 | Variables: []node.Node{ |
| 1987 | &expr.Variable{ |
| 1988 | VarName: &node.Identifier{Value: "a"}, |
| 1989 | }, |
| 1990 | &expr.Variable{ |
| 1991 | VarName: &node.Identifier{Value: "b"}, |
| 1992 | }, |
| 1993 | }, |
| 1994 | }) |
| 1995 | |
| 1996 | expected := `isset($a,$b)` |
| 1997 | actual := o.String() |
| 1998 | |
| 1999 | if expected != actual { |
| 2000 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2001 | } |
| 2002 | } |
| 2003 | |
| 2004 | func TestPrinterPrintList(t *testing.T) { |
| 2005 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…