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

Function TestPrintExprBooleanNot

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

Source from the content-addressed store, hash-verified

1323}
1324
1325func TestPrintExprBooleanNot(t *testing.T) {
1326 o := bytes.NewBufferString("")
1327
1328 p := printer.NewPrettyPrinter(o, " ")
1329 p.Print(&expr.BooleanNot{
1330 Expr: &expr.Variable{VarName: &node.Identifier{Value: "var"}},
1331 })
1332
1333 expected := `!$var`
1334 actual := o.String()
1335
1336 if expected != actual {
1337 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1338 }
1339}
1340
1341func TestPrintExprClassConstFetch(t *testing.T) {
1342 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…