MCPcopy Create free account
hub / github.com/z7zmey/php-parser / TestPrintIsset

Function TestPrintIsset

printer/pretty_printer_test.go:1597–1614  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1595}
1596
1597func 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
1616func TestPrintList(t *testing.T) {
1617 o := bytes.NewBufferString("")

Callers

nothing calls this directly

Calls 3

PrintMethod · 0.95
NewPrettyPrinterFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…