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

Function TestPrinterPrintExprBooleanNot

printer/printer_test.go:1625–1641  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1623}
1624
1625func TestPrinterPrintExprBooleanNot(t *testing.T) {
1626 o := bytes.NewBufferString("")
1627
1628 p := printer.NewPrinter(o)
1629 p.Print(&expr.BooleanNot{
1630 Expr: &expr.Variable{
1631 VarName: &node.Identifier{Value: "var"},
1632 },
1633 })
1634
1635 expected := `!$var`
1636 actual := o.String()
1637
1638 if expected != actual {
1639 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1640 }
1641}
1642
1643func TestPrinterPrintExprClassConstFetch(t *testing.T) {
1644 o := bytes.NewBufferString("")

Callers

nothing calls this directly

Calls 3

PrintMethod · 0.95
NewPrinterFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…